Gabriella Lotz created KUDU-3784:
------------------------------------

             Summary: Support scan predicates on columns that are not in the 
projection
                 Key: KUDU-3784
                 URL: https://issues.apache.org/jira/browse/KUDU-3784
             Project: Kudu
          Issue Type: Improvement
            Reporter: Gabriella Lotz


When a scan projects no (or few) columns but has predicates on columns outside 
the projection, those predicates cannot be evaluated by the 
MaterializingIterator. The most common case is a counting scan (SELECT 
count(...)) with predicates that are not folded into the key range.

Today these out-of-projection predicates are skipped (see the TODO in 
MaterializingIterator::Init). This is safe on the server scan path because 
TabletServiceImpl adds predicate columns to the projection via 
ScanSpec::GetMissingColumns(), so the only skipped predicates are redundant 
ones lifted from the rowset's primary key bounds. But the lower-level scan path 
(no missing-column expansion) has no such guarantee, so a genuine predicate 
could be silently dropped.

Proper fix: materialize the needed columns (or otherwise evaluate the 
predicate) instead of skipping, so predicates on non-projected columns are 
honored generally. The disabled case TestPushdownIntValueRange (count-only 
path) in tablet-pushdown-test.cc should be re-enabled as part of this.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to