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

   ### Describe the issue this Pull Request addresses
   
   Closes https://github.com/apache/hudi/issues/20435.
   
   Partitioned record-index point lookups throw `ArithmeticException` when 
querying an empty partition and `NoSuchElementException` when the input key 
collection is empty. Both lookups should return no locations.
   
   ### Summary and Changelog
   
   - Return an empty result when no file slices match the requested data 
partition or the lookup key set is empty, before selecting a shard.
   - Preserve the existing metadata index availability checks and shard read 
failure propagation.
   - Add regression cases to the existing 
`TestHoodieBackedTableMetadataDataCleanup` class for empty lookups, unavailable 
metadata indexes, shard selection, and read failures.
   
   ### Impact
   
   Partitioned RLI point lookups handle empty partitions and empty key 
collections without throwing. No API or storage format changes.
   
   ### Risk Level
   
   Low. The change adds two early returns to the partition-scoped lookup path. 
Focused validation passed: 24 tests, zero failures/errors, and zero Checkstyle 
violations.
   
   ```bash
   mvn -B -pl hudi-common -am package 
-Dtest=TestHoodieBackedTableMetadataDataCleanup,TestHoodieBackedTableMetadataBuildPredicate
 -Dsurefire.failIfNoSpecifiedTests=false -Dsurefire.rerunFailingTestsCount=0 
-DskipITs -DskipFTs
   ```
   
   ### Documentation Update
   
   None.
   
   ### Contributor's checklist
   
   - [ ] 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
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   


-- 
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