wangzhigang1999 opened a new issue, #11410: URL: https://github.com/apache/paimon/issues/11410
### Search before asking - [x] I searched in the [issues](https://github.com/apache/paimon/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? - [x] I'm willing to submit a PR! -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
