rubenada commented on code in PR #3203:
URL: https://github.com/apache/calcite/pull/3203#discussion_r1194811161
##########
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:
@DonnyZone , you mean e.g. if the expression is used in an overloaded method
that requires a null parameter to be cast to avoid ambiguity?
--
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]