normanj-bitquill commented on code in PR #3942:
URL: https://github.com/apache/calcite/pull/3942#discussion_r1742792245


##########
core/src/main/java/org/apache/calcite/runtime/SqlFunctions.java:
##########
@@ -2829,6 +2829,20 @@ public static long bitAnd(long b0, long b1) {
     return b0 & b1;
   }
 
+  /** Bitwise function <code>BITAND</code> applied to a Long and int value.
+   *  Needed for handling NULL for the first argument.
+   */
+  public static long bitAnd(Long b0, int b1) {
+    return b0 & b1;
+  }
+
+  /** Bitwise function <code>BITAND</code> applied to a Long and int value.

Review Comment:
   Added some more tests with different integer types for the arguments 
(integer and bigint).
   
   Needed to rework the return type detection. It will now use the largest 
integer type if both arguments are integer types. There may be ways of cleaning 
the code up further for the return type inference.



-- 
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