aboutsummaryrefslogtreecommitdiff
path: root/sql/hive
diff options
context:
space:
mode:
authorJakob Odersky <jodersky@gmail.com>2016-03-08 18:11:09 -0800
committerReynold Xin <rxin@databricks.com>2016-03-08 18:11:09 -0800
commit035d3acdf3c1be5b309a861d5c5beb803b946b5e (patch)
tree2ec1cb9a37bd738e5d81f6c34c7b418d167ab461 /sql/hive
parentcc4ab37ee78c888867e773d732e2b3ed89683fe2 (diff)
downloadspark-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/hive')
-rw-r--r--sql/hive/src/test/scala/org/apache/spark/sql/hive/ExpressionSQLBuilderSuite.scala2
-rw-r--r--sql/hive/src/test/scala/org/apache/spark/sql/hive/orc/OrcFilterSuite.scala2
2 files changed, 2 insertions, 2 deletions
diff --git a/sql/hive/src/test/scala/org/apache/spark/sql/hive/ExpressionSQLBuilderSuite.scala b/sql/hive/src/test/scala/org/apache/spark/sql/hive/ExpressionSQLBuilderSuite.scala
index e4b4d1861a..38c84abd7c 100644
--- a/sql/hive/src/test/scala/org/apache/spark/sql/hive/ExpressionSQLBuilderSuite.scala
+++ b/sql/hive/src/test/scala/org/apache/spark/sql/hive/ExpressionSQLBuilderSuite.scala
@@ -47,7 +47,7 @@ class ExpressionSQLBuilderSuite extends SQLBuilderTest {
test("binary comparisons") {
checkSQL('a.int === 'b.int, "(`a` = `b`)")
checkSQL('a.int <=> 'b.int, "(`a` <=> `b`)")
- checkSQL('a.int !== 'b.int, "(NOT (`a` = `b`))")
+ checkSQL('a.int =!= 'b.int, "(NOT (`a` = `b`))")
checkSQL('a.int < 'b.int, "(`a` < `b`)")
checkSQL('a.int <= 'b.int, "(`a` <= `b`)")
diff --git a/sql/hive/src/test/scala/org/apache/spark/sql/hive/orc/OrcFilterSuite.scala b/sql/hive/src/test/scala/org/apache/spark/sql/hive/orc/OrcFilterSuite.scala
index cb40596040..46c390c436 100644
--- a/sql/hive/src/test/scala/org/apache/spark/sql/hive/orc/OrcFilterSuite.scala
+++ b/sql/hive/src/test/scala/org/apache/spark/sql/hive/orc/OrcFilterSuite.scala
@@ -211,7 +211,7 @@ class OrcFilterSuite extends QueryTest with OrcTest {
|expr = (not leaf-0)""".stripMargin.trim
)
checkFilterPredicate(
- '_1 !== 1,
+ '_1 =!= 1,
"""leaf-0 = (EQUALS _1 1)
|expr = (not leaf-0)""".stripMargin.trim
)