Ferdinand Xu created SPARK-62377:
------------------------------------
Summary: Pipeline the streamed-side hash shuffle of eligible batch
joins using RTM’s full-group admission gate
Key: SPARK-62377
URL: https://issues.apache.org/jira/browse/SPARK-62377
Project: Spark
Issue Type: Sub-task
Components: SQL
Affects Versions: 5.0.0
Reporter: Ferdinand Xu
SPARK-62376 introduces pipelined hash shuffles for single-source batch queries.
Extend that support to batch joins where one input can consume a
single-consumer hash shuffle in full. The remote reader should be able to
consume rows before the last producer finishes.
Support two physical plan shapes:
• Shuffled hash outer join. Materialize the build-side shuffle and pipeline
the preserved probe side. This covers LeftOuter with BuildRight and RightOuter
with BuildLeft. Even when the build partition is empty, the join must consume
the probe partition to emit unmatched rows.
• Inner sort-merge join. Pipeline the hash shuffle feeding the left streamed
side when a local sort consumes that shuffle. The sort reads its entire
partition before returning its first row, so shuffle transfer can overlap with
production even though join output still waits for sorting.
Select at most one pipelined hash shuffle per join plan. Schedule the ordinary
shuffle dependencies first, then reuse RTM’s existing full-group admission gate
to start the pipelined producer and reader stages together. Keep ordinary
shuffle for an inner shuffled hash join whose empty build partition can cause
it to skip the probe input. Plans with reused exchanges or subqueries retain
their existing behavior.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]