hsyuan commented on a change in pull request #1878: [CALCITE-3782]Bitwise agg 
operator Bit_And, Bit_OR and Bit_XOR support binary and varbinary type
URL: https://github.com/apache/calcite/pull/1878#discussion_r408243693
 
 

 ##########
 File path: 
core/src/test/java/org/apache/calcite/sql/test/SqlOperatorBaseTest.java
 ##########
 @@ -9096,6 +9114,12 @@ protected void checkAggType(SqlTester tester, String 
expr, String type) {
         false);
     final String[] values = {"1", "2", "1"};
     tester.checkAgg("bit_xor(x)", values, 2, 0);
+    final String[] binaryValues = {
+        "CAST(x'01' AS BINARY)",
+        "cast(x'02' as BINARY)",
+        "cast(x'01' AS BINARY)",
+        "cast(null AS BINARY)"};
+    tester.checkAgg("bit_xor(x)", binaryValues, "02", 0);
 
 Review comment:
   Can you add a case with duplicate element and distinct for BIT_XOR? I am 
afraid it won't work. 

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to