>From Ritik Raj <[email protected]>:
Attention is currently required from: Ritik Raj.
Hello Jenkins,
I'd like you to reexamine a change. Please visit
https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/20944?usp=email
to look at the new patch set (#2).
The following approvals got outdated and were removed:
Verified-1 by Jenkins
Change subject: [ASTERIXDB-3708][COMP] Fix empty results with columnar
secondary index
......................................................................
[ASTERIXDB-3708][COMP] Fix empty results with columnar secondary index
- user model changes: no
- storage format changes: no
- interface changes: no
Details:
When querying a columnar dataset with a secondary index, LIMIT clause,
and field projection (e.g., SELECT VALUE h FROM d1 WHERE
cac_email_domain > 3 LIMIT 2), the query returns empty results with
certain execution sequences.
Root cause: PushLimitIntoPrimarySearchRule moves the SELECT condition
into the UNNEST_MAP operator before field access pushdown.
PushdownOperatorVisitor was calling visitInputs BEFORE registering the
dataset for UnnestMapOperator and LeftOuterUnnestMapOperator. This
timing issue prevented filter fields from being captured in the
def-use chain, so the columnar projection schema only included output
fields but not filter fields.
Fix: Changed PushdownOperatorVisitor to call registerDatasetIfApplicable
BEFORE visitInputs for UnnestMapOperator and LeftOuterUnnestMapOperator,
aligning with the existing pattern for DataSourceScanOperator. This
ensures filter field accesses are properly linked to the scan definition,
causing the projection schema to include both output and filter fields.
Added regression test in column/secondary-index/projection-filter/ to
validate the fix.
Ext-ref: MB-70725
Change-Id: I26e5357141ff77ee210f89b4e93e1e4c33eb6845
---
M
asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/pushdown/visitor/PushdownOperatorVisitor.java
A
asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/column/secondary-index/projection-filter/projection-filter.001.ddl.sqlpp
A
asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/column/secondary-index/projection-filter/projection-filter.002.update.sqlpp
A
asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/column/secondary-index/projection-filter/projection-filter.003.get.http
A
asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/column/secondary-index/projection-filter/projection-filter.005.ddl.sqlpp
A
asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/column/secondary-index/projection-filter/projection-filter.006.query.sqlpp
A
asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/column/secondary-index/projection-filter/projection-filter.007.query.sqlpp
A
asterixdb/asterix-app/src/test/resources/runtimets/results/column/secondary-index/projection-filter/projection-filter.003.regexadm
A
asterixdb/asterix-app/src/test/resources/runtimets/results/column/secondary-index/projection-filter/projection-filter.006.adm
A
asterixdb/asterix-app/src/test/resources/runtimets/results/column/secondary-index/projection-filter/projection-filter.007.adm
M
asterixdb/asterix-app/src/test/resources/runtimets/testsuite_single_partition_sqlpp.xml
M
asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/utils/PushdownUtil.java
12 files changed, 149 insertions(+), 2 deletions(-)
git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb
refs/changes/44/20944/2
--
To view, visit https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/20944?usp=email
To unsubscribe, or for help writing mail filters, visit
https://asterix-gerrit.ics.uci.edu/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: asterixdb
Gerrit-Branch: lumina
Gerrit-Change-Id: I26e5357141ff77ee210f89b4e93e1e4c33eb6845
Gerrit-Change-Number: 20944
Gerrit-PatchSet: 2
Gerrit-Owner: Ritik Raj <[email protected]>
Gerrit-Reviewer: Jenkins <[email protected]>
Gerrit-CC: Anon. E. Moose #1000171
Gerrit-Attention: Ritik Raj <[email protected]>