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

   ### Describe the issue this Pull Request addresses
   
   The Flink catalog package had substantial untested behavior around embedded 
Hive metastore lifecycle operations, path-based catalog defaults, and 
Flink/Hive schema conversion. This left regressions in database and table 
create/alter/drop/list behavior, stored metastore metadata, and logical type 
round-trips difficult to detect.
   
   ### Summary and Changelog
   
   - Exercise `HoodieHiveCatalog` database and table lifecycle APIs against the 
embedded Hive metastore, including duplicate, ignore-if-exists, missing-object, 
owner, location, metadata, and schema assertions.
   - Cover unsupported and default catalog API behavior in `HoodieHiveCatalog` 
and the path-based `HoodieCatalog`.
   - Add primitive and nested Flink-to-Hive and Hive-to-Flink schema conversion 
tests, including table-schema round-trips through `TypeInfoLogicalTypeVisitor`.
   - Cover partition path, partition ordering, Hive configuration, and 
embedded-metastore helpers in `HoodieCatalogUtil`.
   
   Targeted line coverage:
   
   | Class | Before | After |
   | --- | ---: | ---: |
   | `HoodieHiveCatalog` | 48% | 81.8% |
   | `HoodieCatalog` | 62% | 81.2% |
   | `HiveSchemaUtils` | 27% | 96.8% |
   | `TypeInfoLogicalTypeVisitor` | 20% | 91.8% |
   | `HoodieCatalogUtil` | 58% | 82.9% |
   
   The before column is the current Codecov baseline. The after column is from 
a clean targeted local JaCoCo run; CI Codecov is authoritative.
   
   Validation:
   
   - `mvn -f hudi-flink-datasource/hudi-flink/pom.xml -Punit-tests 
-Djacoco.agent.dest.filename=jacoco-catalog-final2.exec -DskipITs -DskipFTs 
-Dcheckstyle.skip -Drat.skip 
-Dtest=TestHoodieHiveCatalog,TestHoodieCatalog,TestHoodieCatalogFactory,TestHiveSchemaUtils,TestHoodieCatalogUtil
 test` (80 tests, 0 failures)
   - `mvn -pl hudi-flink-datasource/hudi-flink -DskipTests -DskipITs -DskipFTs 
-Drat.skip test` (checkstyle: 0 violations)
   - `git diff --check`
   
   ### Impact
   
   Test-only change. There are no public API, runtime behavior, storage format, 
configuration, or performance changes.
   
   ### Risk Level
   
   Low. The change only adds and expands unit tests using the existing embedded 
Hive metastore test setup. The targeted suite and module checkstyle validation 
pass locally.
   
   ### 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