[email protected] has uploaded this change for review. ( 
http://gerrit.cloudera.org:8080/25055


Change subject: IMPALA-15447: report Iceberg query shape via a pluggable 
reporter
......................................................................

IMPALA-15447: report Iceberg query shape via a pluggable reporter

Adds per-query "query shape" reporting for Iceberg tables: the equi-join
key columns and ORDER BY columns, collected by walking the finished plan
after Planner.createPlans and reported once per query. This complements
the scan reports (join keys and ORDER BY live in the plan, above the
scan, so a scan report cannot see them) and is tagged with the same
query id so the two correlate.

The sink is a pluggable IcebergQueryShapeReporter whose implementation
class is named by the 'impala.iceberg.query-shape-reporter-impl' property
(an impalad JVM arg) and loaded once per JVM; with none configured this
is a no-op. There is no hardcoded implementation class. The report runs
on a background thread so query planning is never blocked, and the walk
records only user ORDER BY (full sort or top-n), skipping analytic and
partial sorts. Sort direction is reported only when known.

Testing:
- Added IcebergQueryShapeCollectorTest: asserts join keys and ORDER BY
  on Iceberg tables are reported (incl. DESC, multi-column, TopN,
  NULLS FIRST, join + ORDER BY, and Iceberg/non-Iceberg joins), a
  simple scan reports nothing, and an analytic-only sort is excluded (run:
  mvn test -Dtest=IcebergQueryShapeCollectorTest).
- Ran gerrit-auto-critic (--dryrun): clean.

Change-Id: Icf769dfdd9da33d5e52f4c81ec25419cc36ea43f
Assisted-by: Claude Opus 4.8 (Claude Code)
Co-Authored-By: Claude Opus 4.8 <[email protected]>
---
A fe/src/main/java/org/apache/impala/planner/IcebergQueryShapeCollector.java
M fe/src/main/java/org/apache/impala/service/Frontend.java
A fe/src/main/java/org/apache/impala/util/IcebergQueryShapeReporter.java
A fe/src/test/java/org/apache/impala/planner/IcebergQueryShapeCollectorTest.java
4 files changed, 546 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/55/25055/1
--
To view, visit http://gerrit.cloudera.org:8080/25055
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Icf769dfdd9da33d5e52f4c81ec25419cc36ea43f
Gerrit-Change-Number: 25055
Gerrit-PatchSet: 1
Gerrit-Owner: Anonymous Coward <[email protected]>

Reply via email to