Skip to content
Snippets Groups Projects
Commit 9d3a75ef authored by q00251598's avatar q00251598 Committed by Michael Armbrust
Browse files

[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
parent db346904
No related branches found
No related tags found
No related merge requests found
...@@ -1103,6 +1103,7 @@ https://cwiki.apache.org/confluence/display/Hive/Enhanced+Aggregation%2C+Cube%2C ...@@ -1103,6 +1103,7 @@ https://cwiki.apache.org/confluence/display/Hive/Enhanced+Aggregation%2C+Cube%2C
Cast(nodeToExpr(arg), DateType) Cast(nodeToExpr(arg), DateType)
/* Arithmetic */ /* Arithmetic */
case Token("+", child :: Nil) => Add(Literal(0), nodeToExpr(child))
case Token("-", child :: Nil) => UnaryMinus(nodeToExpr(child)) case Token("-", child :: Nil) => UnaryMinus(nodeToExpr(child))
case Token("~", child :: Nil) => BitwiseNot(nodeToExpr(child)) case Token("~", child :: Nil) => BitwiseNot(nodeToExpr(child))
case Token("+", left :: right:: Nil) => Add(nodeToExpr(left), nodeToExpr(right)) case Token("+", left :: right:: Nil) => Add(nodeToExpr(left), nodeToExpr(right))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment