Repository navigation
[Cherry-pick to branch-1.3] [#14066] fix(starrocks): Map index types when loading StarRocks tables (#14067) - #14199
Merged
Conversation
#14067) ### What changes were proposed in this pull request? Map StarRocks `SHOW INDEX` `Index_type` to Gravitino index types when loading a table: BITMAP to `BITMAP`, GIN to `INVERTED`, VECTOR to `VECTOR`. Indexes without a Gravitino equivalent (e.g. NGRAMBF) are skipped. Update the StarRocks catalog docs accordingly. ### Why are the changes needed? Every index returned by StarRocks `SHOW INDEX` (BITMAP, NGRAMBF, GIN, ...) was reported as a `PRIMARY_KEY` index, so readers saw primary keys that the table does not have, while the table's real keys are not returned by `SHOW INDEX` at all. Fix: #14066 ### Does this PR introduce _any_ user-facing change? Yes. Loaded StarRocks tables report BITMAP, GIN and VECTOR indexes with their real types, and no longer report NGRAMBF indexes as primary keys. ### How was this patch tested? Added a unit test in `TestStarRocksTableOperationsSqlGeneration`, and verified BITMAP, GIN and NGRAMBF against StarRocks 3.3 manually. --------- Co-authored-by: Jerry Shao <jerryshao@datastrato.com> # Conflicts: # catalogs/catalog-jdbc-starrocks/src/test/java/org/apache/gravitino/catalog/starrocks/operation/TestStarRocksTableOperationsSqlGeneration.java # clients/client-python/gravitino/api/rel/indexes/index.py # clients/client-python/tests/unittests/dto/rel/test_index_serdes.py
…f-to-branch-1.3 # Conflicts: # catalogs/catalog-jdbc-starrocks/src/test/java/org/apache/gravitino/catalog/starrocks/operation/TestStarRocksTableOperationsSqlGeneration.java
Author
Code Coverage Report
Files
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Cherry-pick Information:
branch-1.3Do not merge until conflict markers are resolved and the
cherry-pick-conflictlabel is removed.Please review and resolve the conflicts before merging.