Skip to content

[Cherry-pick to branch-1.3] [#14066] fix(starrocks): Map index types when loading StarRocks tables (#14067) - #14199

Merged
jerryshao merged 2 commits into
branch-1.3from
cherry-pick-d4d95ebf-to-branch-1.3
Oct 26, 2026
Merged

jerryshao merged 2 commits into
branch-1.3from
cherry-pick-d4d95ebf-to-branch-1.3

Conversation

@github-actions

Copy link
Copy Markdown

Cherry-pick Information:

  • Original commit: d4d95eb
  • Target branch: branch-1.3
  • Status: ⚠️ Has conflicts - manual resolution required

Do not merge until conflict markers are resolved and the
cherry-pick-conflict label is removed.

Please review and resolve the conflicts before merging.

#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
@github-actions github-actions Bot added cherry-pick Automatically opened cherry-pick PR cherry-pick-conflict Cherry-pick has conflicts; needs human resolution before merge labels Oct 23, 2026
@github-actions
github-actions Bot requested a review from jerryshao October 23, 2026 12:49
@diqiu50 diqiu50 self-assigned this Oct 26, 2026
…f-to-branch-1.3

# Conflicts:
#	catalogs/catalog-jdbc-starrocks/src/test/java/org/apache/gravitino/catalog/starrocks/operation/TestStarRocksTableOperationsSqlGeneration.java
@diqiu50 diqiu50 changed the title [DO NOT MERGE] [Cherry-pick to branch-1.3] [#14066] fix(starrocks): Map index types when loading StarRocks tables (#14067) [Cherry-pick to branch-1.3] [#14066] fix(starrocks): Map index types when loading StarRocks tables (#14067) Oct 26, 2026
@diqiu50 diqiu50 removed the cherry-pick-conflict Cherry-pick has conflicts; needs human resolution before merge label Oct 26, 2026
@github-actions

Copy link
Copy Markdown
Author

Code Coverage Report

Overall Project 69.97% +0.08% 🟢
Files changed 90.93% 🟢

Module Coverage
aliyun 19.74% 🔴
api 47.41% +0.21% 🟢
authorization-common 85.96% 🟢
authorization-ranger 10.17% 🔴
aws 60.78% 🟢
aws-bundle 0.0% 🔴
azure 68.04% 🟢
azure-bundle 0.0% 🔴
catalog-common 19.13% 🔴
catalog-fileset 81.08% 🟢
catalog-glue 71.33% 🟢
catalog-hive 80.55% 🟢
catalog-jdbc-clickhouse 84.78% 🟢
catalog-jdbc-common 54.11% 🟢
catalog-jdbc-doris 89.47% 🟢
catalog-jdbc-hologres 55.61% 🟢
catalog-jdbc-mysql 85.0% 🟢
catalog-jdbc-oceanbase 78.97% 🟢
catalog-jdbc-postgresql 85.54% 🟢
catalog-jdbc-starrocks 83.91% +5.06% 🟢
catalog-kafka 75.49% 🟢
catalog-lakehouse-generic 76.11% 🟢
catalog-lakehouse-hudi 79.1% 🟢
catalog-lakehouse-iceberg 85.98% 🟢
catalog-lakehouse-paimon 82.17% 🟢
catalog-model 78.76% 🟢
cli 44.51% 🟢
client-java 78.45% 🟢
client-java-runtime 0.0% 🔴
common 51.51% 🟢
core 84.25% 🟢
filesystem-hadoop3 77.68% 🟢
flink 18.07% 🔴
flink-common 51.9% 🟢
flink-runtime 0.0% 🔴
gcp 32.2% 🔴
hadoop-common 15.43% 🔴
hive-metastore-common 62.61% 🟢
hive-metastore3-libs 58.8% 🟢
iceberg-aliyun-bundle 0.0% 🔴
iceberg-common 60.96% 🟢
iceberg-rest-server 76.59% 🟢
idp-basic 86.99% 🟢
integration-test-common 0.0% 🔴
jobs 60.37% 🟢
lance-common 35.51% 🔴
lance-rest-server 79.88% 🟢
lineage 59.39% 🟢
optimizer 82.85% 🟢
optimizer-api 42.56% 🟢
server 89.8% 🟢
server-common 79.3% 🟢
spark 28.57% 🔴
spark-common 51.36% 🟢
trino-connector 62.84% 🟢
Files
Module File Coverage
api Index.java 94.44% 🟢
catalog-jdbc-starrocks StarRocksTableOperations.java 90.75% 🟢

@jerryshao
jerryshao merged commit 3631f0d into branch-1.3 Oct 26, 2026
35 checks passed
@jerryshao
jerryshao deleted the cherry-pick-d4d95ebf-to-branch-1.3 branch October 26, 2026 06:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cherry-pick Automatically opened cherry-pick PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants