voonhous commented on PR #20643: URL: https://github.com/apache/hudi/pull/20643#issuecomment-7185485609
Thanks for the contribution! This lets Trino read an initialized Hudi table that has no completed commit as an empty table instead of failing with `HUDI_NO_VALID_COMMIT`, which also matches upstream Trino behaviour. I pushed a follow-up commit on top of yours (`9d7fb39f41ef`) rather than going back and forth on small points: - The empty-table check moved from `HudiSplitManager.getSplits` into the background split loader in `HudiSplitSource`, and the directory lister and split loader are now built on that executor too, so `getSplits` no longer loads the meta client or timeline on the planning thread. One behaviour change: a failure while building them now surfaces as "Failed to generate splits" instead of being thrown from `getSplits`. - `testInitializedTableWithoutCommits` now pins each guard. A `WHERE id = 1` query covers the schema lookup done by index planning when the metadata table and column-name casing are both on, and a MERGE_ON_READ table in CUSTOM merge mode covers the `getMergeRequiredColumns` guard. Table statistics are left at the default. - Smaller cleanups: the test reuses `ResourceHudiTablesInitializer.createTable`, derives its location from an existing table, and the now-unused `HUDI_NO_VALID_COMMIT` code is retired the same way codes 0 and 3 are. I also updated the Summary and Validation sections of the description to match the second commit. Could you take a look and say if anything there, or in the commit, does not match what you intended? This is one review pass, not an approval. -- 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]
