spark-instrumented-optimizer/sql/catalyst
Davies Liu c4fd2a2422 [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)
2015-08-10 13:55:11 -07:00
..
src [SPARK-9759] [SQL] improve decimal.times() and cast(int, decimalType) 2015-08-10 13:55:11 -07:00
pom.xml [SPARK-8064] [SQL] Build against Hive 1.2.1 2015-08-03 15:24:42 -07:00