zstan commented on code in PR #3203:
URL: https://github.com/apache/calcite/pull/3203#discussion_r1194799841


##########
core/src/main/java/org/apache/calcite/adapter/enumerable/RexImpTable.java:
##########
@@ -1164,10 +1164,9 @@ public Expression handle(Expression x) {
 
   static Expression getDefaultValue(Type type) {
     Primitive p = Primitive.of(type);
-    if (p != null) {
-      return Expressions.constant(p.defaultValue, type);
-    }
-    return Expressions.constant(null, type);
+    return p != null
+        ? Expressions.constant(p.defaultValue, type)
+        : Expressions.constant(null);

Review Comment:
   thanks, why we need type info for null ? BTW all tests are green, probably 
you can suggest additional test for your assumption ?



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