Skip to content

[Data] Fix empty block sort in hash shuffle operator#58836

Merged
bveeramani merged 1 commit intomasterfrom
balaji/fix-empty-block-sort
Nov 20, 2025
Merged

[Data] Fix empty block sort in hash shuffle operator#58836
bveeramani merged 1 commit intomasterfrom
balaji/fix-empty-block-sort

Conversation

@bveeramani
Copy link
Copy Markdown
Member

@bveeramani bveeramani commented Nov 19, 2025

Description

Prevent calling sort_by on empty blocks in the Concat.finalize method. Attempting to sort an empty block can cause unnecessary overhead. This change adds a check to ensure the block has data before attempting to sort.

Prevent calling sort_by on empty blocks in the Concat finalize method. Attempting to sort an empty block can cause errors or unnecessary overhead.

Signed-off-by: Balaji Veeramani <bveeramani@berkeley.edu>
@bveeramani bveeramani requested a review from a team as a code owner November 19, 2025 23:41
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a safeguard in the Concat.finalize method to prevent sorting empty blocks within the hash shuffle operator. By adding a check to ensure the block is not empty before attempting to sort, this change improves robustness and prevents potential errors or unnecessary overhead when processing empty partitions. The implementation is correct and well-contained. I approve this change.

@bveeramani bveeramani enabled auto-merge (squash) November 20, 2025 00:41
@github-actions github-actions bot added the go add ONLY when ready to merge, run all tests label Nov 20, 2025
@bveeramani bveeramani merged commit 1cd0c98 into master Nov 20, 2025
7 checks passed
@bveeramani bveeramani deleted the balaji/fix-empty-block-sort branch November 20, 2025 01:19
400Ping pushed a commit to 400Ping/ray that referenced this pull request Nov 21, 2025
## Description

Prevent calling `sort_by` on empty blocks in the `Concat.finalize`
method. Attempting to sort an empty block can cause unnecessary
overhead. This change adds a check to ensure the block has data before
attempting to sort.

Signed-off-by: Balaji Veeramani <bveeramani@berkeley.edu>
ykdojo pushed a commit to ykdojo/ray that referenced this pull request Nov 27, 2025
## Description

Prevent calling `sort_by` on empty blocks in the `Concat.finalize`
method. Attempting to sort an empty block can cause unnecessary
overhead. This change adds a check to ensure the block has data before
attempting to sort.

Signed-off-by: Balaji Veeramani <bveeramani@berkeley.edu>
Signed-off-by: YK <1811651+ykdojo@users.noreply.github.com>
SheldonTsen pushed a commit to SheldonTsen/ray that referenced this pull request Dec 1, 2025
## Description

Prevent calling `sort_by` on empty blocks in the `Concat.finalize`
method. Attempting to sort an empty block can cause unnecessary
overhead. This change adds a check to ensure the block has data before
attempting to sort.

Signed-off-by: Balaji Veeramani <bveeramani@berkeley.edu>
peterxcli pushed a commit to peterxcli/ray that referenced this pull request Feb 25, 2026
## Description

Prevent calling `sort_by` on empty blocks in the `Concat.finalize`
method. Attempting to sort an empty block can cause unnecessary
overhead. This change adds a check to ensure the block has data before
attempting to sort.

Signed-off-by: Balaji Veeramani <bveeramani@berkeley.edu>
Signed-off-by: peterxcli <peterxcli@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

go add ONLY when ready to merge, run all tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants