diff --git a/dbswitch-core/src/main/java/com/gitee/dbswitch/core/model/ColumnMetaData.java b/dbswitch-core/src/main/java/com/gitee/dbswitch/core/model/ColumnMetaData.java index 23f75245..e50badce 100644 --- a/dbswitch-core/src/main/java/com/gitee/dbswitch/core/model/ColumnMetaData.java +++ b/dbswitch-core/src/main/java/com/gitee/dbswitch/core/model/ColumnMetaData.java @@ -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