macroguo-ghy commented on code in PR #3672:
URL: https://github.com/apache/calcite/pull/3672#discussion_r1480844203


##########
core/src/main/java/org/apache/calcite/sql/type/OperandTypes.java:
##########
@@ -393,6 +393,12 @@ public static SqlOperandTypeChecker variadic(
           // Second operand optional (operand index 0, 1)
           number -> number == 1);
 
+  public static final SqlOperandTypeChecker NUMERIC_INT32 =
+      sequence("ROUND(<NUMERIC>, <INTEGER>)",
+          family(SqlTypeFamily.NUMERIC),
+          // Only 32-bit integer allowed for the second argument
+          new TypeNameChecker(SqlTypeName.INTEGER));

Review Comment:
   It's okay for me to use `TypeNameChecker`, but if Calcite implicitly casts 
other integer types to 32-bit integer, it would be better for this case.
   



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