rubenada commented on code in PR #3390:
URL: https://github.com/apache/calcite/pull/3390#discussion_r1335483866
##########
core/src/main/java/org/apache/calcite/rex/RexExecutable.java:
##########
@@ -87,11 +88,14 @@ public void reduce(RexBuilder rexBuilder, List<RexNode>
constExps,
values = new Object[constExps.size()];
} else {
assert values.length == constExps.size();
+ final List<RexNode> successfullyReduced = new ArrayList<>();
final List<@Nullable Object> valueList = Arrays.asList(values);
for (Pair<RexNode, @Nullable Object> value : Pair.zip(constExps,
valueList)) {
- reducedValues.add(
+ successfullyReduced.add(
rexBuilder.makeLiteral(value.right, value.left.getType(), true));
}
+ assert successfullyReduced.size() == constExps.size();
Review Comment:
@JiajunBernoulli sorry I don't quite understand your comment?, wdym?
--
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]