[Bug report] Doris catalog drops INVERTED index properties during create and metadata readback
- Dominant language
- Java
- Stars
- 3.2k
- Forks
- 935
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 298
Description
### Version
main branch
### Describe what's wrong
The JDBC Doris catalog accepts index properties through `Index.properties()` and `TableChange.addIndex(..., properties)`, but its CREATE TABLE and ALTER TABLE ADD INDEX SQL generation omits those properties. The metadata path also ignores the `Properties` column returned by `SHOW INDEX`.
As a result, INVERTED index settings such as `parser` and `support_phrase` are silently lost when an index is created through Gravitino, loaded from a native Doris table, or recreated from loaded metadata. This can change full-text search semantics without reporting an error.
### Error message and/or stacktrace
No exception is raised. The generated index DDL has no `PROPERTIES` clause, and the loaded `Index.properties()` map is empty even when Doris reports properties through `SHOW INDEX`.
### How to reproduce
1. Use the Gravitino main branch with Doris 3.0.6.2 or 4.0.6.
2. Create an INVERTED index through Gravitino with `parser=english` and `support_phrase=true`, or create the same index through native Doris SQL.
3. Load the table through the JDBC Doris catalog.
4. Observe that `Index.properties()` is empty; recreating the table from the loaded indexes therefore drops the effective INVERTED properties.
### Additional context
The public index model and table-change API already carry a `Map` property map, so no public API or OpenAPI change is required. The fix should cover INVERTED CREATE, ALTER ADD INDEX, native metadata adoption, and load/recreate while preserving deterministic SQL generation and rejecting malformed metadata.
Index comments, ANN/VECTOR property policy, NGRAM_BF type support, and index build lifecycle are separate concerns and are outside this bug fix.
Contributor guide
Research direction
Start in the JDBC Doris catalog paths for CREATE TABLE, ALTER TABLE ADD INDEX, and SHOW INDEX metadata readback. Trace properties from Index.properties() and TableChange.addIndex(..., properties) through creation and load/recreate flows, then verify deterministic SQL, preserved metadata, and rejection of malformed metadata.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, sql
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100