Skip to content

[Feature] Scale IndexedSplit size estimates and avoid over-splitting Ray search results #11410

Backlog

Description

@wangzhigang1999

Search before asking

  • I searched in the issues and found nothing similar.

Motivation

When reading global-index search results via query.to_ray():

  1. RayDatasource uses the full underlying file_size for IndexedSplit, inflating size estimates and skewing greedy split balancing when splits select very different row counts.
  2. Leaving override_num_blocks=None triggers Ray Data's default parallelism floor (SplitBlocks), fanning a small Top-K lookup out into single-row blocks and adding unnecessary downstream MapBatches / Sort overhead.

Solution

  1. Compute pre-deletion on-disk row coverage in DataSplit.row_count_before_deletions(files) (deduplicating overlapping Data Evolution column files).
  2. Scale IndexedSplit byte estimates in RayDatasource by selected_rows / row_count_before_deletions.
  3. Bound default override_num_blocks in pypaimon/ray/search_result.py using min(len(splits), concurrency) and DataContext.get_current().target_max_block_size, and clamp read concurrency to min(concurrency, override_num_blocks).

Anything else?

None.

Are you willing to submit a PR?

  • I'm willing to submit a PR!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions