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-6740][SQL] correctly parse NOT operator with comparison operations #8617

Closed
wants to merge 1 commit into from

Conversation

cloud-fan
Copy link
Contributor

We can't parse NOT operator with comparison operations like SELECT NOT TRUE > TRUE, this PR fixed it.

Takes over #6326.

@SparkQA
Copy link

SparkQA commented Sep 5, 2015

Test build #42056 has finished for PR 8617 at commit 7dcfe8b.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@cloud-fan
Copy link
Contributor Author

retest this please

@cloud-fan
Copy link
Contributor Author

cc @marmbrus

@SparkQA
Copy link

SparkQA commented Sep 23, 2015

Test build #42871 has finished for PR 8617 at commit 7dcfe8b.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA
Copy link

SparkQA commented Sep 23, 2015

Test build #42918 has finished for PR 8617 at commit e302962.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@cloud-fan
Copy link
Contributor Author

retest this please.

@SparkQA
Copy link

SparkQA commented Oct 3, 2015

Test build #43210 has finished for PR 8617 at commit e302962.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

notExpression * (AND ^^^ { (e1: Expression, e2: Expression) => And(e1, e2) })

protected lazy val notExpression: Parser[Expression] =
NOT.? ~ comparisonExpression ^^ { case not ~ e => not.map(_ => Not(e)).getOrElse(e) }
Copy link
Contributor

Choose a reason for hiding this comment

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

call it maybeNot ?

@davies
Copy link
Contributor

davies commented Oct 20, 2015

LGTM, will rename it while merging.

@asfgit asfgit closed this in 478c7ce Oct 20, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants