yihua opened a new pull request, #19848: URL: https://github.com/apache/hudi/pull/19848
### Describe the issue this Pull Request addresses issue: #19846 Backport of #19847 to `release-1.2.0`; merge that first. `hoodie.file.group.reader.enabled` stopped affecting batch reads in #14061: it is now read only by the streaming sources, so every snapshot query runs on `HoodieFileGroupReaderBasedFileFormat` with no way to compare it against the legacy read path at runtime. ### Summary and Changelog `DefaultSource` consults the config again for COW snapshot / read-optimized and MOR snapshot queries. With the config off, those queries fall back to `BaseFileOnlyRelation` and `MergeOnReadSnapshotRelation`, the same relations that already serve metadata-table reads and the streaming sources. CDC, incremental and bootstrap queries stay on the file group reader unconditionally, since their legacy relations were removed. Adds `TestFileGroupReaderOptOut`, which pins the routing for both table types and checks that the two paths return the same rows. ### Impact Restores a runtime opt-out from the file group reader on the batch read path, which is what makes a read regression on it diagnosable on a live table. Default behavior is unchanged: the config defaults to true. ### Risk Level low. Routing only, the default path is untouched, and the fallback relations are the ones production already uses for streaming and metadata-table reads. ### 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]
