Zoltan Borok-Nagy has uploaded this change for review. ( 
https://gerrit.cloudera.org/25579


Change subject: PROTOTYPE IMPALA-15855: Plan one instance for unpartitioned CPC 
fragments
......................................................................

PROTOTYPE IMPALA-15855: Plan one instance for unpartitioned CPC fragments

With COMPUTE_PROCESSING_COST=true, an unpartitioned fragment that is
not the root went through the same cost-based sizing as a partitioned
one and could get an adjusted instance count above 1, e.g. 7 for a
LIMIT subquery that receives 500M rows. The scheduler always runs an
unpartitioned fragment as a single instance, so the count only
inflated the planner's core count and the producer side of its
consumers' cost ratio, and was sent to the backend as the fragment's
effective_instance_count.

PlanFragment.adjustToMaxParallelism() now fixes the instance count of
an unpartitioned fragment at 1, and the unbounded core count no
longer takes the maximum parallelism of the inputs of an unpartitioned
union fragment.

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 cases for both, which fail
  without the fix.
- Updated one CPC planner golden; an unpartitioned analytic fragment
  now counts 1 core instead of 2 in the root's core comparison.

Change-Id: Ib90dbeecd5f29a6a38c92b72fdad8a7a262689a3
Assisted-by: Claude Opus 5.5 (Claude Code)
---
M fe/src/main/java/org/apache/impala/planner/CostingSegment.java
M fe/src/main/java/org/apache/impala/planner/PlanFragment.java
M 
fe/src/test/java/org/apache/impala/planner/ProcessingCostDefaultGroupCoresTest.java
M 
testdata/workloads/functional-planner/queries/PlannerTest/tpcds-processing-cost.test
4 files changed, 90 insertions(+), 9 deletions(-)



  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/79/25579/1
--
To view, visit https://gerrit.cloudera.org/25579
To unsubscribe, visit https://gerrit.cloudera.org/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib90dbeecd5f29a6a38c92b72fdad8a7a262689a3
Gerrit-Change-Number: 25579
Gerrit-PatchSet: 1
Gerrit-Owner: Zoltan Borok-Nagy <[email protected]>

Reply via email to