Skip to content

feat: Add native shuffle and columnar shuffle - #30

Merged
viirya merged 2 commits into
apache:mainfrom
viirya:native_shuffle
Feb 16, 2024
Merged

feat: Add native shuffle and columnar shuffle#30
viirya merged 2 commits into
apache:mainfrom
viirya:native_shuffle

Conversation

@viirya

@viirya viirya commented Feb 15, 2024

Copy link
Copy Markdown
Member

Which issue does this PR close?

Closes #29.

Rationale for this change

As a columnar execution engine plugin to Spark, Comet comes out columnar operation support by providing corresponding operators to replace row-based operators in Spark. Shuffle is also a row-based operation in Spark. It is happened between the boundary of SQL operators which need to exchange data according to some specified distribution requirements. Without columnar shuffle, it means we need to do columnar to row/row to columnar around each shuffle operations. Thus, we propose Comet shuffle operators in this patch.

What changes are included in this PR?

Two kind of shuffle operators are included in this patch: native shuffle and columnar shuffle. Both shuffle operators are columnar-based operations and use same native implementation to write shuffle data into disk. Native shuffle takes columnar batches output from Comet operators directly. Columnar shuffle takes row outputs from downstream operators which could be Spark operators or Comet operators wrapped by ColumnarToRow operator. These rows are converted into columnar batches in the native writer and written into disk.

How are these changes tested?

@viirya

viirya commented Feb 15, 2024

Copy link
Copy Markdown
Member Author

The CI failure is:

Files with unapproved licenses:
  .github/pull_request_template.md

It will be fixed at #32 .

@viirya

viirya commented Feb 16, 2024

Copy link
Copy Markdown
Member Author

cc @sunchao

@sunchao sunchao left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks mostly good. The code has already been reviewed internally.

Comment thread common/src/main/scala/org/apache/comet/CometConf.scala Outdated
Comment thread common/src/main/scala/org/apache/comet/CometConf.scala Outdated
Comment thread common/src/main/scala/org/apache/comet/CometConf.scala Outdated
Comment thread common/src/main/scala/org/apache/comet/CometConf.scala
Comment thread common/src/main/scala/org/apache/comet/CometConf.scala
Comment thread common/src/main/scala/org/apache/comet/CometConf.scala Outdated
Comment thread common/src/main/scala/org/apache/comet/CometConf.scala
Comment thread spark/src/main/scala/org/apache/comet/CometSparkSessionExtensions.scala Outdated
Comment thread spark/src/main/scala/org/apache/comet/CometSparkSessionExtensions.scala Outdated
@sunchao

sunchao commented Feb 16, 2024

Copy link
Copy Markdown
Member

Let's also put some details in the PR description.

@viirya

viirya commented Feb 16, 2024

Copy link
Copy Markdown
Member Author

Added some description there.

@sunchao sunchao left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@viirya
viirya merged commit c5aee56 into apache:main Feb 16, 2024
@viirya

viirya commented Feb 16, 2024

Copy link
Copy Markdown
Member Author

Merged. Thanks.

himadripal pushed a commit to himadripal/datafusion-comet that referenced this pull request Sep 7, 2024
* build: Fix references to old Boson build

* build: Only publish Comet for Spark 3.4
schenksj added a commit to schenksj/datafusion-comet that referenced this pull request Jun 29, 2026
schenksj added a commit to schenksj/datafusion-comet that referenced this pull request Jun 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Shuffle support

2 participants