Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[fix] (nereids) Catch exception when mv fail and fix the npe #28932

Merged
merged 1 commit into from
Dec 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Set;
import java.util.stream.Collectors;
import javax.annotation.Nullable;
Expand Down Expand Up @@ -691,7 +692,7 @@ private boolean compareEdgeWithExpr(Edge t, Edge o, Map<Expression, Expression>
}
int size = t.getExpressions().size();
for (int i = 0; i < size; i++) {
if (!expressionMap.get(t.getExpression(i)).equals(o.getExpression(i))) {
if (!Objects.equals(expressionMap.get(t.getExpression(i)), o.getExpression(i))) {
return false;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public class MaterializedViewFilterJoinRule extends AbstractMaterializedViewJoin
@Override
public List<Rule> buildRules() {
return ImmutableList.of(
logicalFilter(logicalJoin(any(), any())).thenApplyMulti(ctx -> {
logicalFilter(logicalJoin(any(), any())).thenApplyMultiNoThrow(ctx -> {
LogicalFilter<LogicalJoin<Plan, Plan>> root = ctx.root;
return rewrite(root, ctx.cascadesContext);
}).toRule(RuleType.MATERIALIZED_VIEW_FILTER_JOIN));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public class MaterializedViewFilterProjectJoinRule extends AbstractMaterializedV
@Override
public List<Rule> buildRules() {
return ImmutableList.of(
logicalFilter(logicalProject(logicalJoin(any(), any()))).thenApplyMulti(ctx -> {
logicalFilter(logicalProject(logicalJoin(any(), any()))).thenApplyMultiNoThrow(ctx -> {
LogicalFilter<LogicalProject<LogicalJoin<Plan, Plan>>> root = ctx.root;
return rewrite(root, ctx.cascadesContext);
}).toRule(RuleType.MATERIALIZED_VIEW_FILTER_PROJECT_JOIN));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public class MaterializedViewOnlyJoinRule extends AbstractMaterializedViewJoinRu
@Override
public List<Rule> buildRules() {
return ImmutableList.of(
logicalJoin(any(), any()).thenApplyMulti(ctx -> {
logicalJoin(any(), any()).thenApplyMultiNoThrow(ctx -> {
LogicalJoin<Plan, Plan> root = ctx.root;
return rewrite(root, ctx.cascadesContext);
}).toRule(RuleType.MATERIALIZED_VIEW_ONLY_JOIN));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public class MaterializedViewProjectFilterJoinRule extends AbstractMaterializedV
@Override
public List<Rule> buildRules() {
return ImmutableList.of(
logicalProject(logicalFilter(logicalJoin(any(), any()))).thenApplyMulti(ctx -> {
logicalProject(logicalFilter(logicalJoin(any(), any()))).thenApplyMultiNoThrow(ctx -> {
LogicalProject<LogicalFilter<LogicalJoin<Plan, Plan>>> root = ctx.root;
return rewrite(root, ctx.cascadesContext);
}).toRule(RuleType.MATERIALIZED_VIEW_PROJECT_FILTER_JOIN));
Expand Down
Loading