diff options
author | Reynold Xin <rxin@databricks.com> | 2016-01-23 12:13:05 -0800 |
---|---|---|
committer | Reynold Xin <rxin@databricks.com> | 2016-01-23 12:13:05 -0800 |
commit | 423783a08bb8730852973aca19603e444d15040d (patch) | |
tree | b178b4f2f0fd6de068195addba392a9700aaf9d0 /sql/core/src | |
parent | 5f56980127704d3c2877d0d0b5047791c00fdac9 (diff) | |
download | spark-423783a08bb8730852973aca19603e444d15040d.tar.gz spark-423783a08bb8730852973aca19603e444d15040d.tar.bz2 spark-423783a08bb8730852973aca19603e444d15040d.zip |
[SPARK-12904][SQL] Strength reduction for integral and decimal literal comparisons
This pull request implements strength reduction for comparing integral expressions and decimal literals, which is more common now because we switch to parsing fractional literals as decimal types (rather than doubles). I added the rules to the existing DecimalPrecision rule with some refactoring to simplify the control flow. I also moved DecimalPrecision rule into its own file due to the growing size.
Author: Reynold Xin <rxin@databricks.com>
Closes #10882 from rxin/SPARK-12904-1.
Diffstat (limited to 'sql/core/src')
-rw-r--r-- | sql/core/src/main/scala/org/apache/spark/sql/SQLContext.scala | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sql/core/src/main/scala/org/apache/spark/sql/SQLContext.scala b/sql/core/src/main/scala/org/apache/spark/sql/SQLContext.scala index 147e3557b6..b774da33ae 100644 --- a/sql/core/src/main/scala/org/apache/spark/sql/SQLContext.scala +++ b/sql/core/src/main/scala/org/apache/spark/sql/SQLContext.scala @@ -74,6 +74,7 @@ class SQLContext private[sql]( def this(sparkContext: SparkContext) = { this(sparkContext, new CacheManager, SQLContext.createListenerAndUI(sparkContext), true) } + def this(sparkContext: JavaSparkContext) = this(sparkContext.sc) // If spark.sql.allowMultipleContexts is true, we will throw an exception if a user |