jiangxt2 opened a new issue, #13375: URL: https://github.com/apache/gravitino/issues/13375
### Describe the feature Allow the Gravitino ClickHouse catalog to create and alter text data-skipping indexes using DDL compatible with the connected ClickHouse server version. ### Motivation The ClickHouse catalog currently rejects text data-skipping indexes in both table creation and `ALTER TABLE ADD INDEX`. The server has changed the index name and DDL grammar across releases, so a single hard-coded `TYPE text(...)` clause does not work on all supported ClickHouse versions. ### Describe the solution - Resolve the connected ClickHouse server version and generate compatible DDL for both `CREATE TABLE` and `ALTER TABLE ADD INDEX`. - Support the legacy positional forms: `inverted(N)` in v23.2–v24.4, `full_text(N)` after v24.5 before the gin rename, and `gin(N)` in the published v25.5.1.2782-stable release ([PR #62884](https://github.com/ClickHouse/ClickHouse/pull/62884), [PR #79024](https://github.com/ClickHouse/ClickHouse/pull/79024), [v25.5.1 changelog](https://github.com/ClickHouse/ClickHouse/blob/master/docs/changelogs/v25.5.1.2782-stable.md)). - Support the early `text` v2 key-value tokenizer grammar from v25.6–v25.8 and the v3 tokenizer grammar introduced in v25.9 ([PR #80855](https://github.com/ClickHouse/ClickHouse/pull/80855), [ClickHouse 25.9 release](https://clickhouse.com/blog/clickhouse-release-25-09)). - From v25.12, emit an explicit tokenizer because `default` is no longer accepted; v26.2+ uses the GA text v3 index ([ClickHouse 25.12 release](https://clickhouse.com/blog/clickhouse-release-25-12)). - Pass `tokenizer` and `ngram_size` through the existing `Index.properties()` and `TableChange.AddIndex.properties` APIs. Use the common ngram-size range 2–8 across dialects. - Handle the text v3 default granularity of `100000000`; ClickHouse ignores an explicitly supplied granularity for this dialect ([text index documentation](https://clickhouse.com/docs/reference/engines/table-engines/mergetree-family/textindexes)). - Fail clearly when the server version cannot be classified, and do not change server-wide experimental settings from the catalog. ### Validation Add unit tests for version resolution, DDL dialect selection, property validation, and both CREATE and ALTER SQL generation. Add one focused Docker test per DDL boundary: 24.4, 24.8.14, 25.5.1.2782, 25.6, 25.9, and 26.2. Run the full single-node and cluster ClickHouse integration suites once on the Gravitino 24.8.14 baseline, with text-index round-trip coverage. ### Additional context Related to [#11934](https://github.com/apache/gravitino/issues/11934), which covers read-time metadata preservation. This is an independent Feature Issue; it does not have a Parent issue or Subtask relationship. The ALTER properties prerequisite is already available through [Gravitino PR #12013](https://github.com/apache/gravitino/pull/12013). -- 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]
