[ https://issues.apache.org/jira/browse/HIVE-16311?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15970615#comment-15970615 ]
Ferdinand Xu commented on HIVE-16311: ------------------------------------- Hi [~mmccline] [~xuefuz], the latest patch from [~colin_mjj] has two main optimizations. 1) avoiding trailing zero for intermediate data twice 2) use bigDecimal.precision() to get the precision. For these two points, it will not break origin Hive's design principles. Any further comments or suggestions on it? > Improve the performance for FastHiveDecimalImpl.fastDivide > ---------------------------------------------------------- > > Key: HIVE-16311 > URL: https://issues.apache.org/jira/browse/HIVE-16311 > Project: Hive > Issue Type: Improvement > Affects Versions: 2.2.0 > Reporter: Colin Ma > Assignee: Colin Ma > Fix For: 3.0.0 > > Attachments: HIVE-16311.001.patch, HIVE-16311.002.patch, > HIVE-16311.003.patch, HIVE-16311.004.patch, HIVE-16311.005.patch, > HIVE-16311.006.patch, HIVE-16311.007.patch, HIVE-16311.008.patch, > HIVE-16311.withTrailingZero.patch > > > FastHiveDecimalImpl.fastDivide is poor performance when evaluate the > expression as 12345.67/123.45 > There are 2 points can be improved: > 1. Don't always use HiveDecimal.MAX_SCALE as scale when do the > BigDecimal.divide. > 2. Get the precision for BigInteger in a fast way if possible. -- This message was sent by Atlassian JIRA (v6.3.15#6346)