yihua opened a new pull request, #19427:
URL: https://github.com/apache/hudi/pull/19427

   ### Describe the issue this Pull Request addresses
   
   Hudi 1.x flipped the default of 
`hoodie.meta.sync.sync_snapshot_with_table_name` from `false` to `true` 
([HUDI-7415]). Under the default `ALL` hive-sync-table-strategy, 
`HiveSyncTool.doSync()` now syncs the bare table name of a MERGE_ON_READ table 
twice in the same run when `hoodie.datasource.hive_sync.skip_ro_suffix=true` is 
also set: once as the read-optimized (RO) table (since `skip_ro_suffix` 
redirects the RO sync onto the bare name instead of `<table>_ro`), then again 
as the real-time (RT) table for the "sync origin table" step, with the RT sync 
silently winning. This makes `skip_ro_suffix` a no-op, leaves no RO view 
registered anywhere, and breaks read-optimized queries against the bare table 
name for engines that can't read `HoodieParquetRealtimeInputFormat` (e.g. 
Presto/Trino).
   
   ### Summary and Changelog
   
   Skips the redundant bare-name RT sync in `HiveSyncTool.doSync()` when 
`skip_ro_suffix` is set, logging a WARN naming the table and stating which 
config takes precedence. The real-time view remains available at `<table>_rt`; 
the bare table name stays registered as the RO view.
   
   No code was copied.
   
   ### Impact
   
   No public API change. Behavior change only for MERGE_ON_READ tables with 
both `hoodie.datasource.hive_sync.skip_ro_suffix=true` and 
`hoodie.meta.sync.sync_snapshot_with_table_name=true`: the bare table name now 
stays registered as the read-optimized view instead of being flipped to 
real-time.
   
   ### Risk Level
   
   low
   
   Change is scoped to a single conditional in `HiveSyncTool.doSync()`; all 
other config combinations (including the previous default of 
`sync_snapshot_with_table_name=false`) are unaffected. Covered by a new 
regression test that reproduces the pre-fix flip.
   
   ### 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