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

   ### Describe the issue this Pull Request addresses
   
   `TestColumnStatsIndexWithSQL` (82 invocations, ~816s in CI) rebuilt the same 
3-commit table for every parameter case and then only ran SQL and data-skipping 
assertions against it. The parameter case also carries `tableVersion` 
(6/8/9/10), but the class never put it into the write options, so every case 
wrote a v10 table.
   
   ### Summary and Changelog
   
   - Writes now set `WRITE_TABLE_VERSION`, `HoodieTableConfig.VERSION` and the 
timeline layout from the case's table version, and every write asserts that the 
table has the requested version.
   - Read-only methods share one cached table per recipe and write options. 
Each version gets its own table. Mutating methods get a private copy.
   - Isolation guards run after each test. They check files (path, size, 
mtime), completed instants and MDT instants, a fresh SparkSession, and 
SQLConf/view cleanup. A changed table is evicted, and only the offending test 
fails.
   - All 82 invocations still run, and nothing is skipped or loosened.
   
   ### Impact
   
   Test-only. Same-window local median 681s -> 555s (ratio 0.82). Lines covered 
in every run went from 28,209 to 30,174, and none were lost. The new lines are 
mostly older-version timeline, MDT writer and log-format paths. 20/20 runs 
passed, 10 of them in random method order. Measured locally on JDK 17 with 4 
pinned CPUs and JaCoCo on; full numbers are in the commit message.
   
   ### Risk Level
   
   low. Test-only. Shared state is guarded and checked after every test.
   
   ### 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