Impala Public Jenkins has submitted this change and it was merged. ( 
http://gerrit.cloudera.org:8080/24818 )

Change subject: IMPALA-15033: Optimize simple LIMIT queries on Iceberg V2 tables
......................................................................

IMPALA-15033: Optimize simple LIMIT queries on Iceberg V2 tables

When OPTIMIZE_SIMPLE_LIMIT is enabled and an Iceberg V2 table has
enough delete-free data files to satisfy the LIMIT, bypass the
expensive delete-join pipeline and scan only the minimum subset of
those files.

The optimization fires early in IcebergScanPlanner.createScanPlan()
and produces a simple IcebergScanNode with just the selected files.
It is skipped for OPTIMIZE TABLE statements, queries with WHERE
clauses, and when there aren't enough delete-free rows to cover the
limit.

Also cleans up Boolean.valueOf(true/false) to Boolean.TRUE/FALSE in
SelectStmt.checkSimpleLimitStmt().

Testing: added iceberg-optimize-simple-limit.test covering mixed
delete/no-delete files, optimization disabled, no-delete tables,
all-deletes tables, and WHERE clause disqualification.

Change-Id: I416d947e3c6e3fb0e4c2da056d75f70c08ac9676
Assisted-by: Claude Opus 4.6 (Claude Code)
Reviewed-on: http://gerrit.cloudera.org:8080/24818
Reviewed-by: Impala Public Jenkins <[email protected]>
Tested-by: Impala Public Jenkins <[email protected]>
---
M fe/src/main/java/org/apache/impala/analysis/SelectStmt.java
M fe/src/main/java/org/apache/impala/planner/IcebergScanPlanner.java
M fe/src/test/java/org/apache/impala/planner/PlannerTest.java
A 
testdata/workloads/functional-planner/queries/PlannerTest/iceberg-optimize-simple-limit.test
4 files changed, 168 insertions(+), 3 deletions(-)

Approvals:
  Impala Public Jenkins: Looks good to me, approved; Verified

--
To view, visit http://gerrit.cloudera.org:8080/24818
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I416d947e3c6e3fb0e4c2da056d75f70c08ac9676
Gerrit-Change-Number: 24818
Gerrit-PatchSet: 4
Gerrit-Owner: Nandor Kollar <[email protected]>
Gerrit-Reviewer: Impala Public Jenkins <[email protected]>
Gerrit-Reviewer: Nandor Kollar <[email protected]>
Gerrit-Reviewer: Noemi Pap-Takacs <[email protected]>
Gerrit-Reviewer: Peter Rozsa <[email protected]>
Gerrit-Reviewer: Zoltan Borok-Nagy <[email protected]>

Reply via email to