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