a-narsudinov opened a new pull request, #20646:
URL: https://github.com/apache/hudi/pull/20646

   ### Describe the issue this Pull Request addresses
   
   The Trino storage adapter implements `HoodieStorage.listDirectEntries()` 
using Trino’s recursive `listFiles()` API, but retains only immediate files. 
This drops child directories and prevents filesystem-backed partition discovery 
from traversing nested partition layouts.
   
   Missing paths also produce empty listings instead of the 
`FileNotFoundException` expected by Hudi callers.
   
   ### Summary and Changelog
   
   Restore the direct-entry listing contract used by Hudi.
   
   - Collapse descendant files into deduplicated direct child entries.
   - Include empty child directories reported by hierarchical filesystems.
   - Apply path filters to direct entries rather than descendant files.
   - Throw `FileNotFoundException` for absent paths while preserving valid 
empty-directory listings on hierarchical filesystems.
   - Reuse the shared `HoodieStorage` contract tests through a test-scoped 
`hudi-io` test JAR, excluding its transitive dependencies.
   - Add coverage for filtered listings, missing paths, empty directories and 
filesystem-backed partition discovery.
   - Use a hierarchical filesystem for timeline-initialization tests that 
require real empty directories.
   
   Validation: all 29 tests across `TestHudiTrinoStorage` and 
`TestHudiTrinoStorageContract` passed.
   
   ### Impact
   
   Restores discovery of nested partitions and aligns missing-path handling 
with Hudi’s storage contract. Direct listings now include immediate files and 
directories.
   
   No public API, configuration or storage-format changes. The additional 
dependency is test-scoped only.
   
   ### Risk Level
   
   medium — Storage listings participate in timeline loading and partition 
discovery, and hierarchical filesystems and object stores have different 
directory semantics.
   
   The shared storage contract and focused tests exercise local and in-memory 
filesystems, including directory deduplication, filtering, missing paths, empty 
directories and nested partition discovery.
   
   ### 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