waynextz commented on code in PR #15972:
URL: https://github.com/apache/iotdb/pull/15972#discussion_r2221476176


##########
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/metadata/TableMetadataImpl.java:
##########
@@ -570,6 +570,47 @@ && isIntegerNumber(argumentTypes.get(2)))) {
                 + " must have at least two arguments, and all type must be the 
same.");
       }
       return argumentTypes.get(0);
+    } else if 
(TableBuiltinScalarFunction.BIT_COUNT.getFunctionName().equalsIgnoreCase(functionName)
+        || 
TableBuiltinScalarFunction.BITWISE_AND.getFunctionName().equalsIgnoreCase(functionName)
+        || 
TableBuiltinScalarFunction.BITWISE_OR.getFunctionName().equalsIgnoreCase(functionName)
+        || TableBuiltinScalarFunction.BITWISE_XOR
+            .getFunctionName()
+            .equalsIgnoreCase(functionName)) {
+      if (argumentTypes.size() != 2
+          || !(isIntegerNumber(argumentTypes.get(0)) && 
isIntegerNumber(argumentTypes.get(1)))) {
+        throw new SemanticException(
+            "Scalar function "
+                + functionName.toLowerCase(Locale.ENGLISH)
+                + " only accepts two arguments and they must be Int32 or Int64 
data type.");
+      }
+      return INT64;

Review Comment:
   After discussion, the return type will be INT64.



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