diff options
author | q00251598 <qiyadong@huawei.com> | 2015-02-04 23:16:01 -0800 |
---|---|---|
committer | Michael Armbrust <michael@databricks.com> | 2015-02-04 23:16:01 -0800 |
commit | 9d3a75ef80d0b736d1366a464bf00b64a120f461 (patch) | |
tree | 983784252750da8cfa3f6babe1c3fdd3a5a540dc | |
parent | db34690466d67f9c8ac6a145fddb5f7ea30a8d8d (diff) | |
download | spark-9d3a75ef80d0b736d1366a464bf00b64a120f461.tar.gz spark-9d3a75ef80d0b736d1366a464bf00b64a120f461.tar.bz2 spark-9d3a75ef80d0b736d1366a464bf00b64a120f461.zip |
[SPARK-5606][SQL] Support plus sign in HiveContext
Now spark version is only support ```SELECT -key FROM DECIMAL_UDF;``` in HiveContext.
This patch is used to support ```SELECT +key FROM DECIMAL_UDF;``` in HiveContext.
Author: q00251598 <qiyadong@huawei.com>
Closes #4378 from watermen/SPARK-5606 and squashes the following commits:
777f132 [q00251598] sql-case22
74dd368 [q00251598] sql-case22
1a67410 [q00251598] sql-case22
c5cd5bc [q00251598] sql-case22
-rw-r--r-- | sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveQl.scala | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveQl.scala b/sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveQl.scala index 286d13944c..62e9d92eac 100644 --- a/sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveQl.scala +++ b/sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveQl.scala @@ -1103,6 +1103,7 @@ https://cwiki.apache.org/confluence/display/Hive/Enhanced+Aggregation%2C+Cube%2C Cast(nodeToExpr(arg), DateType) /* Arithmetic */ + case Token("+", child :: Nil) => Add(Literal(0), nodeToExpr(child)) case Token("-", child :: Nil) => UnaryMinus(nodeToExpr(child)) case Token("~", child :: Nil) => BitwiseNot(nodeToExpr(child)) case Token("+", left :: right:: Nil) => Add(nodeToExpr(left), nodeToExpr(right)) |