Skip to content

Revert "[Data] Vectorize AbsMax, Std, AsList, Quantile, ValueCounter,… - #68383

Merged
sampan-s-nayak merged 1 commit into
masterfrom
revert-68202-data-3654-vectorize-more-aggs
Nov 20, 2026
Merged

sampan-s-nayak merged 1 commit into
masterfrom
revert-68202-data-3654-vectorize-more-aggs

Conversation

@sampan-s-nayak

Copy link
Copy Markdown
Contributor

… TopKUni…"

This reverts commit 259eaea.

Thank you for contributing to Ray! 🚀
Please review the Ray Contribution Guide before opening a pull request.

⚠️ Remove these instructions before submitting your PR.

💡 Tip: Mark as draft if you want early feedback, or ready for review when it's complete.

Description

Briefly describe what this PR accomplishes and why it's needed.

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.

@sampan-s-nayak
sampan-s-nayak requested review from a team as code owners November 20, 2026 02:48
@sampan-s-nayak sampan-s-nayak added the go add ONLY when ready to merge, run all tests label Nov 20, 2026

@gemini-code-assist gemini-code-assist Bot 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.

Code Review

This pull request simplifies Ray Data's aggregation framework by removing several complex vectorized aggregations (such as Std, AbsMax, Quantile, AsList, TopKUnique, and ValueCounter) along with their associated helper functions, specs, benchmarks, and tests. Regarding the feedback, a critical issue was identified in hash_aggregate_v2.py where using pa.concat_tables directly can lead to runtime failures due to schema mismatches (e.g., when handling empty or null-only blocks). It is recommended to use concat(tables, promote_types=True) instead to safely promote types across schemas.

return

combined = concat(tables, promote_types=True)
combined = pa.concat_tables(tables) if len(tables) > 1 else tables[0]

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.

high

Using pa.concat_tables here can lead to runtime failures if the schemas of the incoming tables differ (for example, if one of the blocks is empty or contains only nulls, resulting in a null Arrow type for some columns, while other blocks have concrete types like double or string). To prevent pyarrow.lib.ArrowInvalid schema mismatch errors, we should use concat(tables, promote_types=True) which safely promotes types across schemas.

Suggested change
combined = pa.concat_tables(tables) if len(tables) > 1 else tables[0]
combined = concat(tables, promote_types=True) if len(tables) > 1 else tables[0]

@sampan-s-nayak
sampan-s-nayak enabled auto-merge (squash) November 20, 2026 04:04
@sampan-s-nayak
sampan-s-nayak merged commit f2088de into master Nov 20, 2026
5 of 7 checks passed
@sampan-s-nayak
sampan-s-nayak deleted the revert-68202-data-3654-vectorize-more-aggs branch November 20, 2026 04:09
elliot-barn added a commit that referenced this pull request Nov 23, 2026
…nto releases/2.61.0 (#68472)

## Description

Cherry-pick of #68433 (`1729626bbb`) onto `releases/2.61.0`. Lets the
upstream read or map fuse into the disk-shuffle writer, and sets the
polars thread limit inside the task rather than through the runtime env.

The pick applied without conflicts. Seven master commits that touch the
same files are not on the release branch (#67143, #68158, #68202 and its
revert #68383, #68319, #67570, #68118), so the picked files differ from
master in five places. Reviewers from Data, please confirm none of those
is a prerequisite.

## Testing

Ran locally against the `releases/2.61.0` wheel (`7c8ca5ea51`) with the
picked files overlaid: `test_hash_shuffle_v2.py`,
`test_operator_fusion.py` and `test_execution_optimizer_advanced.py`,
232 passed, 2 skipped.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Signed-off-by: You-Cheng Lin <[email protected]>
Signed-off-by: elliot-barn <[email protected]>
Co-authored-by: You-Cheng Lin <[email protected]>
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

2 participants