mihaibudiu commented on code in PR #3672:
URL: https://github.com/apache/calcite/pull/3672#discussion_r1480850427


##########
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:
   These rules explain how ROUND is typechecked.
   These rules do not say anything about implicit casts, only about legal 
arguments accepted by this function.
   I believe that type coercion is the one that inserts the implicit casts if 
they are necessary.



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