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


Change subject: PROTOTYPE IMPALA-15839: Add CPC_BROADCAST_DOP for broadcast 
join costing
......................................................................

PROTOTYPE IMPALA-15839: Add CPC_BROADCAST_DOP for broadcast join costing

A shared broadcast join build runs in one thread per node, while the
probe side runs in several instances (IMPALA-15631). With MT_DOP > 1,
the broadcast vs partition costing charges the broadcast build with
BROADCAST_TO_PARTITION_FACTOR * sqrt(probe instances per node).
COMPUTE_PROCESSING_COST usually plans with MT_DOP unset, so it does not
pay that penalty, however many probe instances per node it plans later.

The new query option CPC_BROADCAST_DOP applies the penalty under
COMPUTE_PROCESSING_COST for N probe instances per node if N > 0, or for
the maximum instances per node of the query if -1, i.e.
MAX_FRAGMENT_INSTANCES_PER_NODE capped by the cores per executor. Like
the MT_DOP rule, it assumes at most the instances per node that the
probe fragment is planned with, so that a small or unpartitioned probe
side is not charged for threads it does not run. Unlike the MT_DOP
rule, it does not truncate the factor to an integer (IMPALA-15672).
The default 0 keeps the current behavior.

Planned for 12 executors with 16 cores, -1 changes 31 of the 1110 hash
joins of TPC-DS SF10000 (in 12 queries) and 4 of the 63 of TPC-H
SF1000 from broadcast to partitioned; for 3 executors with 64 cores,
63 and 5. 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, which ran with CPC_BROADCAST_DOP=-1.

Testing:
- New ProcessingCostDefaultGroupCoresTest case; new query-options-test
  range case (built, not run).
- With the default value, TPC-DS, TPC-H and a skewed TPC-H variant
  plan identically for 4 cluster shapes, and the CPC planner tests
  pass.

Change-Id: Ic12fa269891a9f0ba19075a7d47f74c114c0e71f
Assisted-by: Claude Opus 5.5 (Claude Code)
---
M be/src/service/query-options-test.cc
M be/src/service/query-options.cc
M be/src/service/query-options.h
M common/thrift/ImpalaService.thrift
M common/thrift/Query.thrift
M fe/src/main/java/org/apache/impala/planner/DistributedPlanner.java
M 
fe/src/test/java/org/apache/impala/planner/ProcessingCostDefaultGroupCoresTest.java
7 files changed, 119 insertions(+), 2 deletions(-)



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

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

Reply via email to