jiangxt2 opened a new pull request, #12826: URL: https://github.com/apache/gravitino/pull/12826
### What changes were proposed in this pull request? This pull request restores the `set_max_values` property when loading ClickHouse `DATA_SKIPPING_SET` indexes from `system.data_skipping_indices.type_full`. The implementation adds a narrow SET parameter parser with overflow-safe validation, preserves the default `set(0)` behavior, supports the modern `type_full` path and legacy parameterized fallback, and keeps malformed or out-of-range metadata from being silently degraded. Existing ngram/token expression-skip behavior is preserved. The tests cover modern and legacy metadata, default values, malformed metadata, `Integer.MAX_VALUE`, `Integer.MAX_VALUE + 1`, the unsigned 64-bit maximum, granularity coexistence, and a real create/load/alter/adoption/recreate lifecycle. ### Why are the changes needed? ClickHouse preserves a SET index parameter such as `set(100)` in its metadata, but the ClickHouse catalog previously loaded only the index type and granularity. The missing parameter caused a later table recreation to emit `set(0)`, changing the index configuration and potentially its data-skipping behavior. Fix: #12787 ### Does this PR introduce _any_ user-facing change? Loaded SET indexes with `set_max_values` in the supported range `0..Integer.MAX_VALUE` now expose the canonical `set_max_values` property. The default value `0` remains omitted from `Index.properties()`. Malformed SET metadata now fails with an index-specific error identifying the metadata source. Out-of-range metadata additionally reports the supported range. No public API, OpenAPI field, or ClickHouse server-version support claim is changed. ### How was this patch tested? - `./gradlew :catalogs-contrib:catalog-jdbc-clickhouse:spotlessCheck` — passed. - `./gradlew rat` — passed. - `./gradlew :catalogs-contrib:catalog-jdbc-clickhouse:test -PskipITs` — 94 tests passed, 0 failures, 0 errors, 0 skipped. - `./gradlew :catalogs-contrib:catalog-jdbc-clickhouse:test --tests 'org.apache.gravitino.catalog.clickhouse.integration.test.CatalogClickHouseIT.testSetIndexParameterReadbackLifecycle' -PskipDockerTests=false --console=plain --no-daemon` on ClickHouse `24.8.14` — 1 test passed. - `./gradlew :catalogs-contrib:catalog-jdbc-clickhouse:test --tests 'org.apache.gravitino.catalog.clickhouse.integration.test.CatalogClickHouseClusterIT' -PskipDockerTests=false --console=plain --no-daemon` on ClickHouse `24.8.14` — 18 tests passed. - `./gradlew :catalogs-contrib:catalog-jdbc-clickhouse:build -x test` — passed. - Supplemental local Gravitino precheck — passed with no errors. The focused and cluster Docker tests passed before the final diagnostics-only review follow-up; the follow-up changed only SET error wording and mocked query-path coverage, without changing CREATE/ALTER/readback lifecycle behavior, so the long IT suites were not rerun. -- 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]
