bwzheng2010 commented on code in PR #4739: URL: https://github.com/apache/hive/pull/4739#discussion_r1416618023
########## common/src/java/org/apache/hadoop/hive/conf/HiveConf.java: ########## @@ -5725,7 +5725,10 @@ public static enum ConfVars { HIVE_ADDITIONAL_CONFIG_FILES("hive.additional.config.files", "", "The names of additional config files, such as ldap-site.xml," + - "tez-site.xml, etc in comma separated list."); + "tez-site.xml, etc in comma separated list."), + + HIVE_SQL_DECIMAL_OPERATIONS_ALLOW_PRECISION_LOSS("hive.sql.decimalOperations.allowPrecisionLoss", true, Review Comment: > i think that is a confusing config, we should fix the precision and scale adjustment in the existing code cc @simhadri-g Hi,Hive’s new behavior introduced in Hive 2.2 (HIVE-15331),The new behavior conflicts with the old behavior, and I think perhaps the only solution is to choose between them through configuration. BTW,This solution takes its cues from Spark's methodology (spark.sql.decimalOperations.allowPrecisionLoss), as extensively outlined in the [Spark SQL Migration Guide ](https://spark.apache.org/docs/2.4.0/sql-migration-guide-upgrade.html#upgrading-from-spark-sql-22-to-23)for the transition from version 2.2 to 2.3 . ########## common/src/java/org/apache/hadoop/hive/conf/HiveConf.java: ########## @@ -5725,7 +5725,10 @@ public static enum ConfVars { HIVE_ADDITIONAL_CONFIG_FILES("hive.additional.config.files", "", "The names of additional config files, such as ldap-site.xml," + - "tez-site.xml, etc in comma separated list."); + "tez-site.xml, etc in comma separated list."), + + HIVE_SQL_DECIMAL_OPERATIONS_ALLOW_PRECISION_LOSS("hive.sql.decimalOperations.allowPrecisionLoss", true, Review Comment: > i think that is a confusing config, we should fix the precision and scale adjustment in the existing code cc @simhadri-g Hi,Hive’s new behavior introduced in Hive 2.2 (HIVE-15331),The new behavior conflicts with the old behavior, and I think perhaps the only solution is to choose between them through configuration. BTW,This solution takes its cues from Spark's methodology (spark.sql.decimalOperations.allowPrecisionLoss), as extensively outlined in the [Spark SQL Migration Guide ](https://spark.apache.org/docs/2.4.0/sql-migration-guide-upgrade.html#upgrading-from-spark-sql-22-to-23)for the transition from version 2.2 to 2.3 . -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org For additional commands, e-mail: gitbox-h...@hive.apache.org