danny0405 opened a new pull request, #19394: URL: https://github.com/apache/hudi/pull/19394
### Describe the issue this Pull Request addresses The Flink dynamic table planning and lookup cache classes have significant unit-test coverage gaps. In particular, source pushdowns and sink changelog negotiation were not exercised through Flink's table planner, while the RocksDB cache and asynchronous lookup wrapper had no direct coverage. These gaps make planner and lookup regressions harder to detect without running full jobs. This PR adds focused planning-only and unit tests. It does not change production code, public APIs, storage formats, or runtime behavior. ### Summary and Changelog - Add planner-only SQL tests that create Hudi tables through `HoodieTableFactory`, translate both source V2 and legacy source plans, and assert filter, projection, partition, limit, and sink pipeline planning without executing a Flink job. - Add `HoodieTableSink` tests for UPSERT/FULL changelog negotiation, copy behavior, overwrite modes, and row-level delete/update operations. - Add direct `RocksDBLookupCache` tests for multi-row keys, cache misses, clear/reinitialize behavior, and idempotent close. - Add `AsyncLookupFunctionWrapper` tests for lifecycle delegation, asynchronous results, and checked-to-unchecked I/O exception propagation. - Extend `HoodieLookupFunction` and `HoodieTableSource` tests for RocksDB cache selection, lookup provider selection, streaming input-format planning, and nested lookup-key rejection. - No code was copied. Per-class line coverage: | Class | Before (Codecov) | After (targeted JaCoCo) | | --- | ---: | ---: | | `HoodieTableSource` | 56% | 84.1% | | `HoodieTableSink` | 10% | 81.4% | | `HoodieTableFactory` | 78% | 89.0% | | `RocksDBLookupCache` | 0% | 100.0% | | `HoodieLookupFunction` | 64% | 81.6% | | `AsyncLookupFunctionWrapper` | 0% | 100.0% | ### Impact Test-only change in `hudi-flink`. There is no public API, configuration, compatibility, storage-format, user-facing behavior, or performance impact. ### Risk Level low The change only adds tests. The targeted unit suite completed with 61 tests, 0 failures, and 0 errors. Planner tests translate physical plans but do not submit a Flink job, and RocksDB state is isolated under JUnit temporary directories. ### Documentation Update none. This is a test-only coverage improvement with no user-facing behavior or configuration changes. ### 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]
