Skip to content

[#12102] feat(jdbc-doris): Support frequently-used table properties#12103

Merged
yuqi1129 merged 5 commits into
apache:mainfrom
jiangxt2:feat/doris-table-properties-p0
Jul 23, 2026
Merged

[#12102] feat(jdbc-doris): Support frequently-used table properties#12103
yuqi1129 merged 5 commits into
apache:mainfrom
jiangxt2:feat/doris-table-properties-p0

Conversation

@jiangxt2

Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

Register 5 frequently-used table properties in
DorisTablePropertiesMetadata:

  • 3 writable: compression, bloom_filter_columns, storage_policy
  • 2 reserved (read-only): light_schema_change,
    enable_unique_key_merge_on_write

The existing read and write paths are already generic, so the
new properties pass through without additional logic changes. A
defense-in-depth filter in appendNecessaryProperties strips reserved
properties from the DDL before SQL generation.

Why are the changes needed?

The jdbc-doris catalog currently only exposes replication_num. Users
cannot configure bloom filter columns, compression, or storage policy
through Gravitino, requiring manual SQL intervention after table
creation.

Fix: #12102

Does this PR introduce any user-facing change?

Yes — 3 new writable table properties and 2 new read-only properties
are exposed in table.properties(). Writable properties can be set
when creating or altering a table. Reserved properties are rejected
with a clear error if passed to createTable.

How was this patch tested?

  • ./gradlew :catalogs:catalog-jdbc-doris:test -PskipITs
    (unit tests: metadata validation + reserved property rejection)
  • ./gradlew :catalogs:catalog-jdbc-doris:test -PskipDockerTests=false -PdorisMultiVersionTest (Docker IT: 1.2.x / 3.0.x / 4.0.x, all
    passing)
  • ./gradlew :catalogs:catalog-jdbc-doris:spotlessCheck
  • ./gradlew rat

jiangxt2 added 3 commits July 20, 2026 18:48
…ties

Register 5 frequently-used table properties in DorisTablePropertiesMetadata:

- 3 writable: compression, bloom_filter_columns, storage_policy
- 2 reserved (read-only): light_schema_change, enable_unique_key_merge_on_write

Add comprehensive test coverage across Doris 1.2.x, 3.0.x, and 4.0.x:
- Unit test: metadata validation (6 properties) + reserved property rejection test
- IT: 3 version Docker tests covering round-trip and reserved property read-back

All pre-commit checks passed: spotlessCheck, RAT, unit tests,
Docker IT (1.2/3.0/4.0), build, gravitino-pr-precheck.py.

Signed-off-by: jiangxt2 <jiangxt2@vip.qq.com>
- Filter reserved properties in appendNecessaryProperties() as defense-in-depth
- Move REPLICATION_FACTOR under writable properties grouping comment
- Use genRandomName for IT test table names to avoid collisions
- Remove duplicate comment in reserved property rejection test

Signed-off-by: jiangxt2 <jiangxt2@vip.qq.com>
…attribute table

Signed-off-by: jiangxt2 <jiangxt2@vip.qq.com>
@jiangxt2
jiangxt2 force-pushed the feat/doris-table-properties-p0 branch from d6b186e to 21b95b0 Compare July 20, 2026 10:48
@github-actions

github-actions Bot commented Jul 21, 2026

Copy link
Copy Markdown

Code Coverage Report

Overall Project 67.77% 🟢
Files changed 100.0% 🟢

Module Coverage
aliyun 1.72% 🔴
api 47.82% 🟢
authorization-common 85.96% 🟢
aws 42.04% 🟢
azure 2.47% 🔴
catalog-common 9.92% 🔴
catalog-fileset 79.74% 🟢
catalog-glue 66.91% 🟢
catalog-hive 79.4% 🟢
catalog-jdbc-common 45.7% 🟢
catalog-jdbc-doris 81.8% +0.22% 🟢
catalog-jdbc-mysql 79.33% 🟢
catalog-jdbc-postgresql 83.39% 🟢
catalog-jdbc-starrocks 79.16% 🟢
catalog-kafka 77.01% 🟢
catalog-lakehouse-generic 59.18% 🟢
catalog-lakehouse-hudi 79.1% 🟢
catalog-lakehouse-iceberg 85.93% 🟢
catalog-lakehouse-paimon 84.23% 🟢
catalog-model 77.72% 🟢
cli 44.5% 🟢
client-java 78.27% 🟢
common 51.95% 🟢
core 82.55% 🟢
filesystem-hadoop3 77.28% 🟢
flink 0.0% 🔴
flink-common 47.09% 🟢
flink-runtime 0.0% 🔴
gcp 14.12% 🔴
hadoop-auth 68.0% 🟢
hadoop-common 12.7% 🔴
hive-metastore-common 53.4% 🟢
iceberg-common 64.65% 🟢
iceberg-rest-server 74.91% 🟢
idp-basic 86.02% 🟢
integration-test-common 0.0% 🔴
jobs 66.17% 🟢
lance-common 20.67% 🔴
lance-rest-server 64.84% 🟢
lineage 53.02% 🟢
optimizer 83.17% 🟢
optimizer-api 21.95% 🔴
server 85.92% 🟢
server-common 76.12% 🟢
spark 28.57% 🔴
spark-common 46.01% 🟢
tencent 69.84% 🟢
trino-connector 40.29% 🟢
Files
Module File Coverage
catalog-jdbc-doris DorisTablePropertiesMetadata.java 100.0% 🟢

Comment thread docs/jdbc-doris-catalog.md Outdated
Comment thread docs/jdbc-doris-catalog.md Outdated
… columns

Signed-off-by: jiangxt2 <jiangxt2@vip.qq.com>
…ed-property classification

- compression: set immutable=true (Doris 1.2/3.0/4.0 all reject
  ALTER TABLE SET compression)
- light_schema_change: promote from reserved to writable with
  immutable=false (Doris allows ALTER TABLE SET)
- enable_unique_key_merge_on_write: promote from reserved to writable
  with immutable=true (must be set at CREATE TABLE time)
- Remove dead reserved-property filter in appendNecessaryProperties
  (no reserved table properties remain after this change)
- Update unit tests, Docker ITs (tested on 1.2.x/3.0.x/4.0.x)
  with ALTER TABLE SET coverage, and documentation

Signed-off-by: jiangxt2 <jiangxt2@vip.qq.com>
@yuqi1129
yuqi1129 merged commit 1249341 into apache:main Jul 23, 2026
37 checks passed
@jiangxt2
jiangxt2 deleted the feat/doris-table-properties-p0 branch July 23, 2026 14:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(jdbc-doris): Support frequently-used table properties

2 participants