Skip to content

[GLUTEN-12462][CORE] Expose shuffle reader metrics iterator delegate#12587

Merged
marin-ma merged 1 commit into
apache:mainfrom
taiyang-li:shuffle_delegate
Jul 21, 2026
Merged

[GLUTEN-12462][CORE] Expose shuffle reader metrics iterator delegate#12587
marin-ma merged 1 commit into
apache:mainfrom
taiyang-li:shuffle_delegate

Conversation

@taiyang-li

@taiyang-li taiyang-li commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Background

One of a small series of common-code changes to introduce a new backend — Bolt (ByteDance’s unified lakehouse analytics acceleration engine) — into the Gluten community. The series minimizes the delta to Gluten common code so Bolt can plug in cleanly, while leaving Velox and ClickHouse backends unaffected. It is part of plan in #12456, close #12462

This PR

Refactor the anonymous map inside ShuffledColumnarBatchRDD.compute into a named class ShuffleReaderWithMetricsIterator that exposes the underlying shuffle-read iterator via a public delegate field. Per-batch semantics are preserved: for every batch we still call SQLColumnarShuffleReadMetricsReporter.incBatchesRecordsRead(numRows) and return the batch.

The Bolt backend needs to unwrap the underlying Iterator[Product2[Int, ColumnarBatch]] for additional post-processing after the shuffle read. Giving the wrapper a stable name and a delegate accessor lets that be done without duplicating the entire compute() path.

Note: the same patch I created before(#12432) had been deleted by #12511 cc @marin-ma. So I create it again...

@taiyang-li
taiyang-li requested a review from marin-ma July 21, 2026 08:42
@taiyang-li
taiyang-li marked this pull request as draft July 21, 2026 08:43
@taiyang-li
taiyang-li marked this pull request as ready for review July 21, 2026 08:44
@github-actions github-actions Bot added the CORE works for Gluten Core label Jul 21, 2026
@github-actions

Copy link
Copy Markdown

Run Gluten Clickhouse CI on x86

1 similar comment
@github-actions

Copy link
Copy Markdown

Run Gluten Clickhouse CI on x86

@marin-ma marin-ma left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@taiyang-li Sorry for the unintentional change. Thank you for following up!

@zhouyuan

Copy link
Copy Markdown
Member

@taiyang-li we are trying to refactor shuffle for gpu execution, will tag you on the following refactor PR

@marin-ma
marin-ma merged commit 36beabd into apache:main Jul 21, 2026
56 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CORE works for Gluten Core

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[CORE] Expose shuffle reader metrics iterator delegate

4 participants