Github user gatorsmile commented on a diff in the pull request:
https://github.com/apache/spark/pull/17764#discussion_r114160731
--- Diff:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/parser/AstBuilder.scala
---
@@ -962,6 +962,11 @@ class AstBuilder extends SqlBaseBaseVisitor[AnyRef]
with Logging {
IsNotNull(e)
case SqlBaseParser.NULL =>
IsNull(e)
+ case SqlBaseParser.DISTINCT =>
+ ctx.NOT match {
+ case null => Not(EqualTo(e, expression(ctx.right)))
--- End diff --
BTW, Could you please add a comment in [line
931](https://github.com/ptkool/spark/blob/faf5ebe4f3fad74e6b44de63c8314a853b895e55/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/parser/AstBuilder.scala#L937)
regarding this new syntax support?
Nit: could you please follow how we deal with `IS NOT NULL`?
```Scala
case SqlBaseParser.DISTINCT if ctx.NOT != null =>
EqualNullSafe(e, expression(ctx.right))
case SqlBaseParser.DISTINCT =>
Not(EqualNullSafe(e, expression(ctx.right)))
```
---
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]