mirror of
https://gitee.com/dromara/dbswitch.git
synced 2025-10-14 22:00:23 +00:00
!76 issues-I4IJ6V: Hive的Float类型转换其他数据库类型数据过长问题
* Merge branch 'master' from dev * issues-I4IJ6V: Hive的Float类型转换其他数据库类型数据过长问题
This commit is contained in:
@@ -356,12 +356,21 @@ public class ColumnMetaData {
|
||||
}
|
||||
}
|
||||
|
||||
// If we're dealing with Hive and double precision types
|
||||
if (desc.getDbType() == DatabaseTypeEnum.HIVE && type == java.sql.Types.DOUBLE
|
||||
&& precision >= 15
|
||||
&& length >= 15) {
|
||||
precision = 6;
|
||||
length = 25;
|
||||
// If we're dealing with Hive and double/float precision types
|
||||
if (desc.getDbType() == DatabaseTypeEnum.HIVE) {
|
||||
if (type == java.sql.Types.DOUBLE
|
||||
&& precision >= 15
|
||||
&& length >= 15) {
|
||||
precision = 6;
|
||||
length = 25;
|
||||
}
|
||||
|
||||
if (type == java.sql.Types.FLOAT
|
||||
&& precision >= 7
|
||||
&& length >= 7) {
|
||||
precision = 6;
|
||||
length = 25;
|
||||
}
|
||||
}
|
||||
|
||||
// if the length or precision needs a BIGNUMBER
|
||||
|
Reference in New Issue
Block a user