[fix](planner)use base index if the where clause is a constant value (#18367)
sql : select bitmap_empty() from d_table where true; should always use base index instead of any mv, because the conjuncts is constant (true) and use none of the column from any mv
This commit is contained in:
@ -474,7 +474,9 @@ public class OlapScanNode extends ScanNode {
|
||||
if (mvColumn == null) {
|
||||
boolean isBound = false;
|
||||
for (Expr conjunct : conjuncts) {
|
||||
if (conjunct.isBound(slotDescriptor.getId())) {
|
||||
List<TupleId> tids = Lists.newArrayList();
|
||||
conjunct.getIds(tids, null);
|
||||
if (!tids.isEmpty() && conjunct.isBound(slotDescriptor.getId())) {
|
||||
isBound = true;
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user