Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SPARK-4692] [SQL] Support ! boolean logic operator like NOT #3555

Closed
wants to merge 23 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
cdef539
Merge pull request #1 from apache/master
YanTangZhai Aug 6, 2014
cbcba66
Merge pull request #3 from apache/master
YanTangZhai Aug 20, 2014
8a00106
Merge pull request #6 from apache/master
YanTangZhai Sep 12, 2014
03b62b0
Merge pull request #7 from apache/master
YanTangZhai Sep 16, 2014
76d4027
Merge pull request #8 from apache/master
YanTangZhai Oct 20, 2014
d26d982
Merge pull request #9 from apache/master
YanTangZhai Nov 4, 2014
e249846
Merge pull request #10 from apache/master
YanTangZhai Nov 11, 2014
6e643f8
Merge pull request #11 from apache/master
YanTangZhai Dec 1, 2014
92242c7
Update HiveQl.scala
YanTangZhai Dec 2, 2014
74175b4
Update HiveQuerySuite.scala
YanTangZhai Dec 3, 2014
950b21e
Update HiveQuerySuite.scala
YanTangZhai Dec 3, 2014
718afeb
Merge pull request #12 from apache/master
YanTangZhai Dec 5, 2014
59e4de9
make hive test
marmbrus Dec 17, 2014
1893956
Merge pull request #14 from marmbrus/pr/3555
YanTangZhai Dec 18, 2014
bd2c444
Update HiveQuerySuite.scala
YanTangZhai Dec 22, 2014
efc4210
Update HiveQuerySuite.scala
YanTangZhai Dec 22, 2014
1e1ebb4
Update HiveQuerySuite.scala
YanTangZhai Dec 22, 2014
e4c2c0a
Merge pull request #15 from apache/master
YanTangZhai Dec 24, 2014
192411d
Merge pull request #17 from YanTangZhai/master
YanTangZhai Dec 31, 2014
ea618f4
Update HiveQuerySuite.scala
YanTangZhai Dec 31, 2014
992046e
Update HiveQuerySuite.scala
YanTangZhai Dec 31, 2014
7c03c68
Merge pull request #23 from apache/master
YanTangZhai Dec 31, 2014
1a9f605
Update HiveQuerySuite.scala
YanTangZhai Dec 31, 2014
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1077,6 +1077,7 @@ https://cwiki.apache.org/confluence/display/Hive/Enhanced+Aggregation%2C+Cube%2C
case Token(AND(), left :: right:: Nil) => And(nodeToExpr(left), nodeToExpr(right))
case Token(OR(), left :: right:: Nil) => Or(nodeToExpr(left), nodeToExpr(right))
case Token(NOT(), child :: Nil) => Not(nodeToExpr(child))
case Token("!", child :: Nil) => Not(nodeToExpr(child))

/* Case statements */
case Token("TOK_FUNCTION", Token(WHEN(), Nil) :: branches) =>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,14 @@ class HiveQuerySuite extends HiveComparisonTest with BeforeAndAfter {
sql("SHOW TABLES")
}
}

createQueryTest("! operator",
"""
|SELECT a FROM (
| SELECT 1 AS a FROM src LIMIT 1 UNION ALL
| SELECT 2 AS a FROM src LIMIT 1) table
|WHERE !(a>1)
""".stripMargin)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please add spaces around >?


createQueryTest("constant object inspector for generic udf",
"""SELECT named_struct(
Expand Down