rahil-c opened a new pull request, #19204: URL: https://github.com/apache/hudi/pull/19204
## Summary Adds unit test coverage for the pure-logic classes in `hudi-common` called out in [ENG-44588](https://app.clickup.com/t/86e24cjpg) (a subtask of the broader coverage effort in ENG-44401), which had 0% or low line coverage: - `index/secondary/SecondaryIndexManager` (0% -> covered): create/drop/show, duplicate detection (same name, and same type+columns under a different name), missing-index errors, schema validation - `index/secondary/HoodieSecondaryIndex` (0% -> covered): builder, Lucene single-column validation, `toString`, `HoodieIndexCompactor` - `index/secondary/SecondaryIndexUtils` (0% -> covered): JSON round trip, malformed input, unknown-property tolerance - `index/secondary/SecondaryIndexType` (0% -> covered): `of(byte)`/`of(String)` success and failure paths - `common/bloom/Key`: equals/hashCode/compareTo/serde - `common/bloom/SimpleBloomFilter`: add/mightContain, serialize round trip, `or()` - `common/bloom/InternalDynamicBloomFilter`: growth across number of keys, and/or/xor/not, write/readFields round trip (extends existing `TestInternalDynamicBloomFilter`) - `expression/Predicates`: eval and null-handling for each predicate type (extends existing `TestPredicates`) - `expression/PartialBindVisitor`: missing-field branches for Not/In/IsNull/IsNotNull/StringStartsWith/StringContains, unsupported predicate type (extends existing `TestPartialBindVisitor`) - `expression/BindVisitor`: full binding, missing-field errors, And/Or short-circuit and simplification branches (new) ### Notes - `hudi-common` has no filesystem-backed `HoodieStorage`/`StorageConfiguration` implementation available at test time (that lives in `hudi-hadoop-common`, which depends on `hudi-common`, so it can't be added as a test dependency without a module cycle). `TestSecondaryIndexManager` therefore mocks `HoodieTableMetaClient` and intercepts the static `HoodieTableConfig#update`/`#delete` calls, applying them to a real in-memory `HoodieTableConfig` so the test still exercises the actual persistence-adjacent logic in `SecondaryIndexManager` faithfully, without touching disk. - All classes are covered with assertions on returned values/exceptions (no smoke-only tests). ## Test plan - [x] `mvn -pl hudi-common test -Dtest=TestSecondaryIndexManager,TestHoodieSecondaryIndex,TestSecondaryIndexUtils,TestSecondaryIndexType,TestKey,TestSimpleBloomFilter,TestInternalDynamicBloomFilter,TestPredicates,TestPartialBindVisitor,TestBindVisitor` — 149 tests, all passing - [x] `mvn -pl hudi-common checkstyle:check` — clean 🤖 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]
