a-narsudinov opened a new pull request, #20645: URL: https://github.com/apache/hudi/pull/20645
### Describe the issue this Pull Request addresses Merge-on-read tables queried through the read-optimized input format are represented as `COPY_ON_WRITE` tables by the Trino connector. However, the underlying table can contain file groups with log files but no base file. The connector passes these groups to the base-file split builder, which requires a base file and fails the entire query. Read-optimized scans should skip these groups because they read only base files. ### Summary and Changelog Skip log-only file groups when planning read-optimized scans. - Return no splits for groups without a base file in the read-optimized planning path. - Preserve log-only groups during snapshot split planning. - Add split-factory coverage for both read-optimized and snapshot modes. - Add a SQL regression that introduces a synthetic log-only group into the stock-ticks fixture and verifies that the read-optimized row count remains unchanged without opening the log. Validation: all three tests across `TestHudiReadOptimizedSplits` and `TestHudiReadOptimizedLogOnly` passed. ### Impact Prevents read-optimized queries from failing when a table contains log-only file groups. Records stored exclusively in logs remain excluded according to read-optimized semantics. Snapshot split planning continues to retain log-only groups; this change does not add support for reading them. No public API, configuration or storage-format changes. ### Risk Level low — The change is limited to the base-file/read-optimized planning path. Tests verify that read-optimized scans skip log-only groups while snapshot planning retains them. ### Documentation Update none ### Contributor's checklist - [x] Read through [contributor's guide](https://hudi.apache.org/contribute/how-to-contribute) - [x] Enough context is provided in the sections above - [x] Adequate tests were added if applicable -- 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]
