Zoltan Borok-Nagy has uploaded this change for review. ( https://gerrit.cloudera.org/25584
Change subject: PROTOTYPE IMPALA-15852: Run small TopN scan fragments at the scan bound ...................................................................... PROTOTYPE IMPALA-15852: Run small TopN scan fragments at the scan bound Since a TopN is costed by its heap size, a scan fragment under a TopN with a small limit is sized by the scan cost alone. That gives one instance per node for scans of a few CPU-seconds, e.g. three SCAN -> TOP-N [LIMIT=10] queries went from 62 to 12 instances and got slower. The old N * log2(N) TopN cost had pushed these fragments to their scan range bound by accident. Such a fragment reads its whole input but sends at most limit + offset rows per instance, so more instances add almost no downstream work. A fragment that is a single scan, optionally with SelectNodes, under a non-partitioned TopN with limit + offset <= 1000 now runs at min(scan threads, max instances). A plain LIMIT, which stops the scan early, and larger TopNs are still sized by cost. This is part of a series of COMPUTE_PROCESSING_COST (CPC) costing prototypes. The last one (IMPALA-15841) has the measured effect of the series. Testing: - New ProcessingCostDefaultGroupCoresTest case, fails without the fix. - CPC planner tests pass; TPC-DS, TPC-H and a skewed TPC-H variant plan identically for 12 executors with 16 cores. Change-Id: I56eed93dbde40743fe3c607df21fce07438785f4 Assisted-by: Claude Opus 5.5 (Claude Code) --- M fe/src/main/java/org/apache/impala/planner/PlanFragment.java M fe/src/test/java/org/apache/impala/planner/ProcessingCostDefaultGroupCoresTest.java 2 files changed, 65 insertions(+), 2 deletions(-) git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/84/25584/1 -- To view, visit https://gerrit.cloudera.org/25584 To unsubscribe, visit https://gerrit.cloudera.org/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I56eed93dbde40743fe3c607df21fce07438785f4 Gerrit-Change-Number: 25584 Gerrit-PatchSet: 1 Gerrit-Owner: Zoltan Borok-Nagy <[email protected]>
