Skip to content

Commit

Permalink
Prevent errors during constant reduction from crashing the compiler
Browse files Browse the repository at this point in the history
Signed-off-by: Mihai Budiu <[email protected]>
  • Loading branch information
mihaibudiu committed Oct 30, 2024
1 parent b3d0b03 commit 9b88b5b
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -135,12 +135,10 @@ public static RexExecutable getExecutable(RexBuilder rexBuilder, List<RexNode> e
*/
@Override public void reduce(RexBuilder rexBuilder, List<RexNode> constExps,
List<RexNode> reducedValues) {
assert reducedValues.isEmpty();
try {
String code = compile(rexBuilder, constExps, (list, index, storageType) -> {
throw new UnsupportedOperationException();
});

final RexExecutable executable = new RexExecutable(code, constExps);
executable.setDataContext(dataContext);
executable.reduce(rexBuilder, constExps, reducedValues);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8761,7 +8761,7 @@ private RelOptFixture spatial(String sql) {
/**
* Custom implementation of {@link Filter} for use
* in test case to verify that {@link FilterMultiJoinMergeRule}
* can be created with any {@link Filter} and not limited to
Rex* can be created with any {@link Filter} and not limited to
* {@link org.apache.calcite.rel.logical.LogicalFilter}.
*/
private static class MyFilter extends Filter {
Expand Down

0 comments on commit 9b88b5b

Please sign in to comment.