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 snapshot, read-optimized and 
incremental queries on both table types. With the config off, those queries 
fall back to `BaseFileOnlyRelation`, `MergeOnReadSnapshotRelation` and 
`IncrementalRelationV1`/`V2`, `MergeOnReadIncrementalRelationV1`/`V2`, the 
relations that already serve metadata-table reads and the streaming sources. 
CDC and bootstrap queries stay on the file group reader unconditionally: their 
relations were deleted in #17457, so there is nothing left to fall back to. 
Adds `TestFileGroupReaderOptOut`, which pins the routing for snapshot and 
incremental queries on COW and MOR, and checks that both 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]

Reply via email to