diff options
author | Jakob Odersky <jodersky@gmail.com> | 2016-03-08 18:11:09 -0800 |
---|---|---|
committer | Reynold Xin <rxin@databricks.com> | 2016-03-08 18:11:09 -0800 |
commit | 035d3acdf3c1be5b309a861d5c5beb803b946b5e (patch) | |
tree | 2ec1cb9a37bd738e5d81f6c34c7b418d167ab461 /sql/catalyst | |
parent | cc4ab37ee78c888867e773d732e2b3ed89683fe2 (diff) | |
download | spark-035d3acdf3c1be5b309a861d5c5beb803b946b5e.tar.gz spark-035d3acdf3c1be5b309a861d5c5beb803b946b5e.tar.bz2 spark-035d3acdf3c1be5b309a861d5c5beb803b946b5e.zip |
[SPARK-7286][SQL] Deprecate !== in favour of =!=
This PR replaces #9925 which had issues with CI. **Please see the original PR for any previous discussions.**
## What changes were proposed in this pull request?
Deprecate the SparkSQL column operator !== and use =!= as an alternative.
Fixes subtle issues related to operator precedence (basically, !== does not have the same priority as its logical negation, ===).
## How was this patch tested?
All currently existing tests.
Author: Jakob Odersky <jodersky@gmail.com>
Closes #11588 from jodersky/SPARK-7286.
Diffstat (limited to 'sql/catalyst')
-rw-r--r-- | sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/dsl/package.scala | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/dsl/package.scala b/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/dsl/package.scala index a12f7396fe..63463265e3 100644 --- a/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/dsl/package.scala +++ b/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/dsl/package.scala @@ -83,7 +83,7 @@ package object dsl { def >= (other: Expression): Predicate = GreaterThanOrEqual(expr, other) def === (other: Expression): Predicate = EqualTo(expr, other) def <=> (other: Expression): Predicate = EqualNullSafe(expr, other) - def !== (other: Expression): Predicate = Not(EqualTo(expr, other)) + def =!= (other: Expression): Predicate = Not(EqualTo(expr, other)) def in(list: Expression*): Expression = In(expr, list) |