jiangxt2 opened a new pull request, #12920: URL: https://github.com/apache/gravitino/pull/12920
### What changes were proposed in this pull request? This pull request preserves Apache Doris INVERTED index properties across CREATE TABLE, ALTER TABLE ADD INDEX, native metadata adoption, and load/recreate. The write path validates property keys and values, sorts keys for deterministic SQL, and reuses the existing Doris `PROPERTIES` serializer for both CREATE and ALTER. The read path parses the flat `SHOW INDEX.Properties` representation and attaches the result only when the raw Doris index type is `INVERTED`; missing or empty metadata keeps the existing empty-map behavior. The parser preserves commas and equals signs inside quoted values and preserves literal backslashes while rejecting malformed or duplicate entries. Properties are attached only to raw Doris INVERTED rows; raw ANN, NGRAM_BF, BITMAP, and unknown rows retain empty property maps. The Doris catalog documentation now describes the property contract, server-added effective defaults, unsupported index comments, and the embedded-double-quote round-trip boundary. ### Why are the changes needed? The public Gravitino index and table-change APIs already carry property maps, but the JDBC Doris catalog currently discards them in both DDL generation and metadata loading. Property-bearing INVERTED indexes can therefore lose parser, phrase-search, and related full-text behavior during create, load, or recreate without raising an error. Fix: #12914 ### Does this PR introduce _any_ user-facing change? Yes. Doris INVERTED properties supplied during CREATE TABLE or ALTER TABLE ADD INDEX are now emitted in DDL, and effective properties reported by Doris are available through `Index.properties()` when the table is loaded. Property availability, values, and server-added defaults remain controlled by the Doris version. Arbitrary property values containing embedded double quotes are not guaranteed to round-trip because Doris does not escape them in `SHOW INDEX`; Gravitino rejects metadata outside the supported flat quoted-pair format. No public API or property key is added or removed. Index comments, ANN/VECTOR properties, NGRAM_BF representation, and index build lifecycle remain unsupported by this change. ### How was this patch tested? - `./gradlew :catalogs:catalog-jdbc-doris:spotlessCheck` — passed. - `./gradlew rat` — passed. - `./gradlew :catalogs:catalog-jdbc-doris:test -PskipITs` — passed with 43 tests, 0 skipped, 0 failures, and 0 errors. - `./gradlew :catalogs:catalog-jdbc-doris:test --tests 'org.apache.gravitino.catalog.doris.integration.test.CatalogDoris3xIT.testInvertedIndexPropertiesRoundTrip' -PskipDockerTests=false -PdorisMultiVersionTest` — passed against Doris 3.0.6.2 with 1 test, 0 skipped, 0 failures, and 0 errors. - `./gradlew :catalogs:catalog-jdbc-doris:test --tests 'org.apache.gravitino.catalog.doris.integration.test.CatalogDoris4xIT.testInvertedIndexPropertiesRoundTrip' -PskipDockerTests=false -PdorisMultiVersionTest` — passed against Doris 4.0.6 with 1 test, 0 skipped, 0 failures, and 0 errors. - `./gradlew :catalogs:catalog-jdbc-doris:build -x test` — passed. - `git diff --check` — passed. -- 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]
