[Fix](Row Store) all filter should match key columns condition (#36400) (#36443)

Queries like `select * from tbl` will pass
`LogicalResultSinkToShortCircuitPointQuery` rule in the previous.
Introduced by #35823
This commit is contained in:
lihangyu
2024-06-19 14:06:53 +08:00
committed by GitHub
parent bdba954e1f
commit 38d750a7e0
3 changed files with 54 additions and 1 deletions

View File

@ -74,7 +74,10 @@ public class LogicalResultSinkToShortCircuitPointQuery implements RewriteRuleFac
// All key columns in conjuncts
Set<String> colNames = Sets.newHashSet();
for (Expression expr : conjuncts) {
colNames.add(((SlotReference) removeCast((expr.child(0)))).getName());
SlotReference slot = ((SlotReference) removeCast((expr.child(0))));
if (slot.isKeyColumnFromTable()) {
colNames.add(slot.getName());
}
}
// set short circuit flag and modify nothing to the plan
if (olapTable.getBaseSchemaKeyColumns().size() <= colNames.size()) {