Github user chenghao-intel commented on a diff in the pull request:
https://github.com/apache/spark/pull/6326#discussion_r30962856
--- Diff:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/SqlParser.scala ---
@@ -228,7 +228,12 @@ class SqlParser extends AbstractSparkSQLParser with
DataTypeParser {
andExpression * (OR ^^^ { (e1: Expression, e2: Expression) => Or(e1,
e2) })
protected lazy val andExpression: Parser[Expression] =
- comparisonExpression * (AND ^^^ { (e1: Expression, e2: Expression) =>
And(e1, e2) })
+ booleanFactor * (AND ^^^ { (e1: Expression, e2: Expression) => And(e1,
e2) })
--- End diff --
Instead of bind the rule `booleanFactor` with `andExpression`, a better
place probably be `expression` rule.
(https://github.com/smola/spark/blob/feature/operator-precedence/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/SqlParser.scala#L225)
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]