[Fix](nereids) fix qualifier problem that affects delete stmt in another catalog (#33528)

* [Fix](nereids) fix qualifier problem that affects delete stmt in another catalog

* [Fix](nereids) fix qualifier problem that affects delete stmt in another catalog

* [Fix](nereids) fix qualifier problem that affects delete stmt in another catalog

* [Fix](nereids) fix qualifier problem that affects delete stmt in another catalog

---------

Co-authored-by: feiniaofeiafei <moailing@selectdb.com>
This commit is contained in:
feiniaofeiafei
2024-04-11 21:43:01 +08:00
committed by GitHub
parent 3d66723214
commit dc8da9ee89
5 changed files with 81 additions and 68 deletions

View File

@ -64,7 +64,7 @@ class BindRelationTest extends TestWithFeService implements GeneratedPlanPattern
Assertions.assertTrue(plan instanceof LogicalOlapScan);
Assertions.assertEquals(
ImmutableList.of(DEFAULT_CLUSTER_PREFIX + DB1, "t"),
ImmutableList.of("internal", DEFAULT_CLUSTER_PREFIX + DB1, "t"),
((LogicalOlapScan) plan).qualified());
}
@ -76,7 +76,7 @@ class BindRelationTest extends TestWithFeService implements GeneratedPlanPattern
Assertions.assertTrue(plan instanceof LogicalOlapScan);
Assertions.assertEquals(
ImmutableList.of(DEFAULT_CLUSTER_PREFIX + DB1, "t"),
ImmutableList.of("internal", DEFAULT_CLUSTER_PREFIX + DB1, "t"),
((LogicalOlapScan) plan).qualified());
}

View File

@ -70,18 +70,18 @@ public class ColumnPruningTest extends TestWithFeService implements MemoPatternM
logicalProject()
.when(p -> getOutputQualifiedNames(p).containsAll(
ImmutableList.of(
"test.student.id",
"test.student.name"))),
"internal.test.student.id",
"internal.test.student.name"))),
logicalProject().when(
p -> getOutputQualifiedNames(p).containsAll(
ImmutableList.of(
"test.score.sid",
"test.score.grade")))
"internal.test.score.sid",
"internal.test.score.grade")))
))
.when(p -> getOutputQualifiedNames(p)
.containsAll(
ImmutableList.of("test.student.name",
"test.student.id")))
ImmutableList.of("internal.test.student.name",
"internal.test.student.id")))
)
)
);
@ -102,18 +102,18 @@ public class ColumnPruningTest extends TestWithFeService implements MemoPatternM
logicalProject()
.when(p -> getOutputQualifiedNames(p).containsAll(
ImmutableList.of(
"test.student.id",
"test.student.name",
"test.student.sex"))),
"internal.test.student.id",
"internal.test.student.name",
"internal.test.student.sex"))),
logicalRelation()
))
.when(p -> getOutputQualifiedNames(p)
.containsAll(
ImmutableList.of("test.student.name",
"test.score.cid",
"test.score.grade",
"test.student.sex")))
ImmutableList.of("internal.test.student.name",
"internal.test.score.cid",
"internal.test.score.grade",
"internal.test.student.sex")))
)
)
);
@ -129,9 +129,9 @@ public class ColumnPruningTest extends TestWithFeService implements MemoPatternM
logicalFilter(
logicalProject().when(p -> getOutputQualifiedNames(p)
.containsAll(ImmutableList.of(
"test.student.name",
"test.student.id",
"test.student.age")))
"internal.test.student.name",
"internal.test.student.id",
"internal.test.student.age")))
)
)
);
@ -155,25 +155,25 @@ public class ColumnPruningTest extends TestWithFeService implements MemoPatternM
logicalProject(logicalRelation())
.when(p -> getOutputQualifiedNames(
p).containsAll(ImmutableList.of(
"test.student.id",
"test.student.name"))),
"internal.test.student.id",
"internal.test.student.name"))),
logicalRelation()
)).when(p -> getOutputQualifiedNames(p)
.containsAll(ImmutableList.of(
"test.student.name",
"test.score.cid",
"test.score.grade"))),
"internal.test.student.name",
"internal.test.score.cid",
"internal.test.score.grade"))),
logicalProject(logicalRelation())
.when(p -> getOutputQualifiedNames(p)
.containsAll(ImmutableList.of(
"test.course.cid",
"test.course.cname")))
"internal.test.course.cid",
"internal.test.course.cname")))
)
).when(p -> getOutputQualifiedNames(p).containsAll(ImmutableList.of(
"test.student.name",
"test.course.cname",
"test.score.grade")))
"internal.test.student.name",
"internal.test.course.cname",
"internal.test.score.grade")))
)
)
);
@ -280,12 +280,12 @@ public class ColumnPruningTest extends TestWithFeService implements MemoPatternM
logicalProject(logicalRelation())
.when(p -> getOutputQualifiedNames(p)
.containsAll(ImmutableList.of(
"test.student.id",
"test.student.name"))),
"internal.test.student.id",
"internal.test.student.name"))),
logicalProject(logicalRelation())
.when(p -> getOutputQualifiedNames(p)
.containsAll(ImmutableList.of(
"test.score.sid")))
"internal.test.score.sid")))
)
)
);
@ -304,10 +304,10 @@ public class ColumnPruningTest extends TestWithFeService implements MemoPatternM
logicalProject(
logicalOlapScan()
).when(p -> getOutputQualifiedNames(p).equals(
ImmutableList.of("test.student.id")
ImmutableList.of("internal.test.student.id")
))
).when(agg -> getOutputQualifiedNames(agg.getOutputs()).equals(
ImmutableList.of("test.student.id")
ImmutableList.of("internal.test.student.id")
)))
)
)