Rakesh Kumar created SPARK-62333:
------------------------------------
Summary: Coalesce small key groups above GroupPartitionsExec while
keeping a keyed layout
Key: SPARK-62333
URL: https://issues.apache.org/jira/browse/SPARK-62333
Project: Spark
Issue Type: Improvement
Components: SQL
Affects Versions: 5.0.0
Reporter: Rakesh Kumar
A scan whose keyed layout an operator needs, such as a storage-partitioned join
or an aggregation on the partition keys, runs one task per key group, however
small the group is. With many small days or buckets that means many tiny tasks,
and AQE can't coalesce them, because the leaves are scans. SPARK-60265 packs
only scans whose layout nothing needs, so it leaves these alone.
This ticket is about merging adjacent whole key groups into fewer partitions
above {{GroupPartitionsExec}}, keeping a {{KeyedPartitioning}} that the
operator above can still use:
* For transforms with a {{ReducibleFunction}}, the existing reducers can
coarsen the keys on both sides, e.g. {{bucket(1024, x)}} to {{bucket(64, x)}},
or hours to days. The layout stays a {{KeyedPartitioning}} over the reduced
keys, so only choosing the reduction from the sizes is new.
* For identity keys, both sides of a join need the same boundaries over the
sorted keys, decided from their combined sizes. That needs a layout with a
range of keys per partition.
* A key above the target stays alone, with partial clustering as today.
The sizes would come from {{HasPartitionStatistics}}, as in SPARK-60265.
Discussed on https://github.com/apache/spark/pull/59522.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]