julianhyde commented on code in PR #3785:
URL: https://github.com/apache/calcite/pull/3785#discussion_r1597162522


##########
core/src/main/java/org/apache/calcite/sql/type/ReturnTypes.java:
##########
@@ -551,6 +551,13 @@ public static SqlCall stripSeparator(SqlCall call) {
       opBinding -> opBinding.getTypeFactory().leastRestrictive(
           opBinding.collectOperandTypes());
 
+  public static final SqlReturnTypeInference NVL2_RESTRICTIVE = opBinding -> {
+    RelDataType opType1 = opBinding.getOperandType(1);
+    RelDataType opType2 = opBinding.getOperandType(2);
+    return opBinding.getOperandType(0).getSqlTypeName() == SqlTypeName.NULL ? 
opType2 : opType1;
+  };
+
+

Review Comment:
   remove blank line



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