Skip to content

Conversation

@alexeykudinkin
Copy link
Contributor

@alexeykudinkin alexeykudinkin commented Oct 22, 2025

Description

Currently, streaming repartition isn't combining blocks to the target_num_rows_per_block which is problematic, in a sense that it can only split blocks but not recombine them.

This PR is addressing that by allowing it to recombine smaller blocks into bigger ones. However, one caveat is that the remainder of the block could still be under target_num_rows_per_block.

Related issues

Link related issues: "Fixes #1234", "Closes #1234", or "Related to #1234".

Additional information

Optional: Add implementation details, API changes, usage examples, screenshots, etc.

Signed-off-by: Alexey Kudinkin <ak@anyscale.com>
Signed-off-by: Alexey Kudinkin <ak@anyscale.com>
@alexeykudinkin alexeykudinkin requested a review from a team as a code owner October 22, 2025 21:49
@alexeykudinkin alexeykudinkin added the go add ONLY when ready to merge, run all tests label Oct 22, 2025
data_context,
name=op.name,
compute_strategy=compute,
min_rows_per_bundle=op.target_num_rows_per_block,
Copy link

Choose a reason for hiding this comment

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

Bug: MapOperator Parameter Validation Issue

The min_rows_per_bundle parameter for MapOperator.create is assigned op.target_num_rows_per_block without validation. If op.target_num_rows_per_block is None, zero, or negative, it could cause unexpected behavior in MapOperator as a positive integer is likely expected.

Fix in Cursor Fix in Web

Copy link
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 correctly enables the combining of smaller blocks in streaming repartition by setting min_rows_per_bundle. The core logic change appears sound. My feedback focuses on improving the test suite to enhance clarity and coverage. I've suggested refactoring the main test for better readability and adding a new test to validate the behavior with remainder blocks, which is a key aspect of this change mentioned in the PR description but not currently covered.

@alexeykudinkin alexeykudinkin enabled auto-merge (squash) October 22, 2025 21:58
Copy link
Contributor

@srinathk10 srinathk10 left a comment

Choose a reason for hiding this comment

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

LGTM

@alexeykudinkin alexeykudinkin merged commit 97c8390 into master Oct 22, 2025
7 checks passed
@alexeykudinkin alexeykudinkin deleted the ak/strm-repr-fix branch October 22, 2025 23:37
alexeykudinkin added a commit that referenced this pull request Oct 23, 2025
## Description

Currently, streaming repartition isn't combining blocks to the
`target_num_rows_per_block` which is problematic, in a sense that it can
only split blocks but not recombine them.

This PR is addressing that by allowing it to recombine smaller blocks
into bigger ones. However, one caveat is that the remainder of the block
could still be under `target_num_rows_per_block`.

## Related issues
> Link related issues: "Fixes #1234", "Closes #1234", or "Related to
#1234".

## Additional information
> Optional: Add implementation details, API changes, usage examples,
screenshots, etc.

---------

Signed-off-by: Alexey Kudinkin <ak@anyscale.com>
xinyuangui2 pushed a commit to xinyuangui2/ray that referenced this pull request Oct 27, 2025
…8020)

## Description

Currently, streaming repartition isn't combining blocks to the
`target_num_rows_per_block` which is problematic, in a sense that it can
only split blocks but not recombine them.

This PR is addressing that by allowing it to recombine smaller blocks
into bigger ones. However, one caveat is that the remainder of the block
could still be under `target_num_rows_per_block`.

## Related issues
> Link related issues: "Fixes ray-project#1234", "Closes ray-project#1234", or "Related to
ray-project#1234".

## Additional information
> Optional: Add implementation details, API changes, usage examples,
screenshots, etc.

---------

Signed-off-by: Alexey Kudinkin <ak@anyscale.com>
Signed-off-by: xgui <xgui@anyscale.com>
landscapepainter pushed a commit to landscapepainter/ray that referenced this pull request Nov 17, 2025
…8020)

## Description

Currently, streaming repartition isn't combining blocks to the
`target_num_rows_per_block` which is problematic, in a sense that it can
only split blocks but not recombine them.

This PR is addressing that by allowing it to recombine smaller blocks
into bigger ones. However, one caveat is that the remainder of the block
could still be under `target_num_rows_per_block`.

## Related issues
> Link related issues: "Fixes ray-project#1234", "Closes ray-project#1234", or "Related to
ray-project#1234".

## Additional information
> Optional: Add implementation details, API changes, usage examples,
screenshots, etc.

---------

Signed-off-by: Alexey Kudinkin <ak@anyscale.com>
Aydin-ab pushed a commit to Aydin-ab/ray-aydin that referenced this pull request Nov 19, 2025
…8020)

## Description

Currently, streaming repartition isn't combining blocks to the
`target_num_rows_per_block` which is problematic, in a sense that it can
only split blocks but not recombine them.

This PR is addressing that by allowing it to recombine smaller blocks
into bigger ones. However, one caveat is that the remainder of the block
could still be under `target_num_rows_per_block`.

## Related issues
> Link related issues: "Fixes ray-project#1234", "Closes ray-project#1234", or "Related to
ray-project#1234".

## Additional information
> Optional: Add implementation details, API changes, usage examples,
screenshots, etc.

---------

Signed-off-by: Alexey Kudinkin <ak@anyscale.com>
Signed-off-by: Aydin Abiar <aydin@anyscale.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.

Ray fails to serialize self-reference objects

3 participants