julianhyde commented on code in PR #3012:
URL: https://github.com/apache/calcite/pull/3012#discussion_r1063774372


##########
testkit/src/main/java/org/apache/calcite/test/SqlOperatorTest.java:
##########
@@ -2712,6 +2712,14 @@ private static void checkNullOperand(SqlOperatorFixture 
f, String op) {
     f1.checkBoolean("1 <> 1", false);
     f1.checkBoolean("1 != 1", false);
     f1.checkBoolean("1 != null", null);
+
+    // "!=" is allowed under BIG_QUERY SQL conformance level
+    final SqlOperatorFixture f2 =
+        f.withConformance(SqlConformanceEnum.BIG_QUERY);
+    f2.checkBoolean("1 <> 1", false);
+    f2.checkBoolean("1 != 1", false);
+    f2.checkBoolean("2 != 1", true);
+    f2.checkBoolean("1 != null", null);
   }

Review Comment:
   you have copy-pasted 3 tests from above and added one. can you make the 
Oracle and BigQuery conformances share code? E.g.
   ```
   final Consumer<SqlOperatorFixture> consumer = f -> {
   ```



##########
babel/src/test/resources/sql/big-query.iq:
##########
@@ -2596,4 +2596,52 @@ FROM items;
 
 !ok
 
+#####################################################################
+# NOT EQUAL Operator (value1 != value2)
+#
+# Compares value1 and value2 and returns TRUE if not equal.
+SELECT (5 != 3) as result;
++--------+
+| result |
++--------+
+| true   |
++--------+
+(1 row)
+
+!ok
+
+SELECT (5 != 5) as result;
++--------+
+| result |
++--------+
+| false  |
++--------+
+(1 row)
+
+!ok
+
+#####################################################################
+# MODULO % OPERATOR (value1 % value2)
+#
+# Returns the remainder of dividing value1 by value2.
+SELECT (5 % 3) as result;
++--------+
+| result |
++--------+
+|      2 |
++--------+
+(1 row)
+
+!ok
+
+SELECT (19 % 19) as result;
++--------+
+| result |
++--------+
+|      0 |
++--------+
+(1 row)
+
+!ok

Review Comment:
   Same comments as I made on another of your PRs. Don't add at the end. It 
causes merge conflicts.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to