mihaibudiu commented on code in PR #4846:
URL: https://github.com/apache/calcite/pull/4846#discussion_r2989916090
##########
core/src/main/java/org/apache/calcite/rel/rules/ValuesReduceRule.java:
##########
@@ -186,9 +186,15 @@ protected void apply(RelOptRuleCall call, @Nullable
LogicalProject project,
final RexNode reducedValue =
reducibleExps.get((row * fieldsPerRow) + i);
++i;
- if (!reducedValue.isAlwaysTrue()) {
- ++changeCount;
- continue;
+ if (reducedValue instanceof RexLiteral
+ || RexUtil.isNullLiteral(reducedValue, true)) {
Review Comment:
Please add a comment about that, it will help other people in the future.
I have approved, so you can just amend this commit.
--
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]