diff options
author | Davies Liu <davies@databricks.com> | 2015-08-10 13:55:11 -0700 |
---|---|---|
committer | Reynold Xin <rxin@databricks.com> | 2015-08-10 13:55:19 -0700 |
commit | d17303a94820ded970030968006ecabe76820278 (patch) | |
tree | 5d830ec5c960fc26b6bcd74888835d87ab3aea97 /graphx/pom.xml | |
parent | 23842482f46b45d90ba32ce406675cdb5f88c537 (diff) | |
download | spark-d17303a94820ded970030968006ecabe76820278.tar.gz spark-d17303a94820ded970030968006ecabe76820278.tar.bz2 spark-d17303a94820ded970030968006ecabe76820278.zip |
[SPARK-9759] [SQL] improve decimal.times() and cast(int, decimalType)
This patch optimize two things:
1. passing MathContext to JavaBigDecimal.multiply/divide/reminder to do right rounding, because java.math.BigDecimal.apply(MathContext) is expensive
2. Cast integer/short/byte to decimal directly (without double)
This two optimizations could speed up the end-to-end time of a aggregation (SUM(short * decimal(5, 2)) 75% (from 19s -> 10.8s)
Author: Davies Liu <davies@databricks.com>
Closes #8052 from davies/optimize_decimal and squashes the following commits:
225efad [Davies Liu] improve decimal.times() and cast(int, decimalType)
(cherry picked from commit c4fd2a242228ee101904770446e3f37d49e39b76)
Signed-off-by: Reynold Xin <rxin@databricks.com>
Diffstat (limited to 'graphx/pom.xml')
0 files changed, 0 insertions, 0 deletions