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


Change subject: PROTOTYPE IMPALA-15854: Count the rows a CPC costing segment 
produces correctly
......................................................................

PROTOTYPE IMPALA-15854: Count the rows a CPC costing segment produces correctly

A costing segment is a blocking PlanNode or DataSink with its
non-blocking descendants. When a node was appended to a segment,
CostingSegment.appendCost() set the rows the segment produces to the
rows that node consumes, not the rows it produces. A segment ending in
an aggregation therefore reported the aggregation's input as its
output. In TPC-DS q43, the merge aggregation segment showed consumed
and produced rows of 162000:162000 instead of 162000:1350.

The produced rows are used as the producer side of the
consumer/producer cost-per-row ratio that lowers the parallelism of
the next segment in the same fragment, so that segment was sized
against the wrong row stream. appendCost() now takes the produced rows
from the appended node.

In the PARALLELPLANS sections of the 3TB TPC-DS planner tests, not
counting the mem_limit copies, this changes 17 fragments in 8
queries. 14 get fewer instances, e.g. q59 F02 and F07 go from 120 to
40. 3 in q18 get more: the fragment of a rollup preaggregation, which
produces more rows than it consumes, goes from 40 to 110. With the
Calcite planner, 48 fragments in 14 queries get fewer instances.

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:
- Updated the CPC planner test goldens, including the Calcite ones.

Change-Id: I982082cb12209ef4c9be7bb100b958d1a8f3de0e
Assisted-by: Claude Opus 5.5 (Claude Code)
---
M fe/src/main/java/org/apache/impala/planner/CostingSegment.java
M 
testdata/workloads/functional-planner/queries/PlannerTest/calcite_tpcds/tpcds-q04.test
M 
testdata/workloads/functional-planner/queries/PlannerTest/calcite_tpcds/tpcds-q06.test
M 
testdata/workloads/functional-planner/queries/PlannerTest/calcite_tpcds/tpcds-q11.test
M 
testdata/workloads/functional-planner/queries/PlannerTest/calcite_tpcds/tpcds-q15.test
M 
testdata/workloads/functional-planner/queries/PlannerTest/calcite_tpcds/tpcds-q22.test
M 
testdata/workloads/functional-planner/queries/PlannerTest/calcite_tpcds/tpcds-q39a.test
M 
testdata/workloads/functional-planner/queries/PlannerTest/calcite_tpcds/tpcds-q39b.test
M 
testdata/workloads/functional-planner/queries/PlannerTest/calcite_tpcds/tpcds-q43-verbose.test
M 
testdata/workloads/functional-planner/queries/PlannerTest/calcite_tpcds/tpcds-q47.test
M 
testdata/workloads/functional-planner/queries/PlannerTest/calcite_tpcds/tpcds-q57.test
M 
testdata/workloads/functional-planner/queries/PlannerTest/calcite_tpcds/tpcds-q59.test
M 
testdata/workloads/functional-planner/queries/PlannerTest/calcite_tpcds/tpcds-q64.test
M 
testdata/workloads/functional-planner/queries/PlannerTest/calcite_tpcds/tpcds-q65.test
M 
testdata/workloads/functional-planner/queries/PlannerTest/calcite_tpcds/tpcds-q78.test
M 
testdata/workloads/functional-planner/queries/PlannerTest/calcite_tpcds/tpcds-q80.test
M 
testdata/workloads/functional-planner/queries/PlannerTest/tpcds_cpu_cost/tpcds-q15.test
M 
testdata/workloads/functional-planner/queries/PlannerTest/tpcds_cpu_cost/tpcds-q18.test
M 
testdata/workloads/functional-planner/queries/PlannerTest/tpcds_cpu_cost/tpcds-q22.test
M 
testdata/workloads/functional-planner/queries/PlannerTest/tpcds_cpu_cost/tpcds-q43-verbose.test
M 
testdata/workloads/functional-planner/queries/PlannerTest/tpcds_cpu_cost/tpcds-q47.test
M 
testdata/workloads/functional-planner/queries/PlannerTest/tpcds_cpu_cost/tpcds-q57.test
M 
testdata/workloads/functional-planner/queries/PlannerTest/tpcds_cpu_cost/tpcds-q59.test
M 
testdata/workloads/functional-planner/queries/PlannerTest/tpcds_cpu_cost/tpcds-q64-mem_limit-10g.test
M 
testdata/workloads/functional-planner/queries/PlannerTest/tpcds_cpu_cost/tpcds-q64-mem_limit_executors-20g.test
M 
testdata/workloads/functional-planner/queries/PlannerTest/tpcds_cpu_cost/tpcds-q64.test
M 
testdata/workloads/functional-planner/queries/PlannerTest/tpcds_cpu_cost/tpcds-q65.test
M 
testdata/workloads/functional-planner/queries/PlannerTest/tpcds_cte/tpcds-q04.test
M 
testdata/workloads/functional-planner/queries/PlannerTest/tpcds_cte/tpcds-q06.test
M 
testdata/workloads/functional-planner/queries/PlannerTest/tpcds_cte/tpcds-q11.test
M 
testdata/workloads/functional-planner/queries/PlannerTest/tpcds_cte/tpcds-q15.test
M 
testdata/workloads/functional-planner/queries/PlannerTest/tpcds_cte/tpcds-q22.test
M 
testdata/workloads/functional-planner/queries/PlannerTest/tpcds_cte/tpcds-q64.test
M 
testdata/workloads/functional-planner/queries/PlannerTest/tpcds_cte/tpcds-q65.test
M 
testdata/workloads/functional-planner/queries/PlannerTest/tpcds_cte/tpcds-q68.test
M 
testdata/workloads/functional-planner/queries/PlannerTest/tpcds_cte/tpcds-q78.test
M 
testdata/workloads/functional-planner/queries/PlannerTest/tpcds_cte/tpcds-q80.test
M 
testdata/workloads/functional-planner/queries/PlannerTest/tpcds_tuple_cache/tpcds-q15.test
M 
testdata/workloads/functional-planner/queries/PlannerTest/tpcds_tuple_cache/tpcds-q18.test
M 
testdata/workloads/functional-planner/queries/PlannerTest/tpcds_tuple_cache/tpcds-q22.test
M 
testdata/workloads/functional-planner/queries/PlannerTest/tpcds_tuple_cache/tpcds-q47.test
M 
testdata/workloads/functional-planner/queries/PlannerTest/tpcds_tuple_cache/tpcds-q57.test
M 
testdata/workloads/functional-planner/queries/PlannerTest/tpcds_tuple_cache/tpcds-q59.test
M 
testdata/workloads/functional-planner/queries/PlannerTest/tpcds_tuple_cache/tpcds-q64.test
M 
testdata/workloads/functional-planner/queries/PlannerTest/tpcds_tuple_cache/tpcds-q65.test
45 files changed, 1,838 insertions(+), 1,833 deletions(-)



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

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

Reply via email to