[fix](nereids) prune partition bug in pattern ColA <> ColB #25769

in predicate rewrite phase, we eliminate some conjuncts which contains un-interested columns.
for example: T (a, b) partition by (a)
interest cols: a
uninsterest cols: b
for parition prune,
filter "a=1 and a>b" is equivalent to "a=1",
filter "a=1 or a>b" is equivalent to "TRUE"
This commit is contained in:
minghong
2023-10-26 12:06:37 +08:00
committed by GitHub
parent e7a3cb079b
commit af3e6f604a
2 changed files with 24 additions and 0 deletions

View File

@ -228,6 +228,8 @@ class PruneOlapScanPartitionTest extends TestWithFeService implements MemoPatter
public void canNotPruneComplexPredicate() {
test("test_range_parts", "(part = 10) or (part + id = 1)", 4);
test("test_range_parts", "(part + id = 1) and (part = 4)", 1);
test("test_range_parts", "(part = 2) and (part <> id)", 1);
test("test_range_parts", "(part = 2) or (part <> id)", 4);
}
@Test