Skip to content

[#12065] fix(jdbc): validate type mappings before table DDL#12081

Draft
nevzheng wants to merge 1 commit into
apache:mainfrom
nevzheng:codex/v3-phase2-jdbc-common
Draft

[#12065] fix(jdbc): validate type mappings before table DDL#12081
nevzheng wants to merge 1 commit into
apache:mainfrom
nevzheng:codex/v3-phase2-jdbc-common

Conversation

@nevzheng

Copy link
Copy Markdown
Collaborator

What changes were proposed in this pull request?

Add shared JDBC type-mapping preflight validation for complete create and alter requests.

The shared operation layer now validates every type-bearing column or change before generating or executing DDL, and exposes capability hooks for connector-specific checks. Custom ClickHouse and OceanBase operation paths are routed through the same contract.

Why are the changes needed?

A later invalid column in a create or alter request must not leave earlier DDL partially applied. JDBC connectors need one shared boundary that converts or rejects the whole request before database mutation.

Fix: #12065

Related: #12056

Does this PR introduce any user-facing change?

Yes. Unsupported JDBC type mappings fail before DDL generation or execution, preserving the public invalid-argument and no-partial-mutation contract.

How was this patch tested?

  • Added focused JdbcTypeConverter validation coverage.
  • Covered both create overloads.
  • Covered whole-batch alter validation before SQL generation.
  • Covered connector capability hooks.
  • Updated docs/manage-relational-metadata-using-gravitino.md.

@github-actions

Copy link
Copy Markdown

Code Coverage Report

Overall Project 67.89% +0.17% 🟢
Files changed 78.28% 🟢

Module Coverage
aliyun 1.72% 🔴
api 47.82% 🟢
authorization-common 85.96% 🟢
aws 42.04% 🟢
azure 2.47% 🔴
catalog-common 9.92% 🔴
catalog-fileset 80.23% 🟢
catalog-glue 66.91% 🟢
catalog-hive 79.42% 🟢
catalog-jdbc-clickhouse 81.76% +5.02% 🟢
catalog-jdbc-common 45.47% +5.47% 🟢
catalog-jdbc-doris 81.6% 🟢
catalog-jdbc-hologres 54.03% 🟢
catalog-jdbc-mysql 79.23% 🟢
catalog-jdbc-oceanbase 80.95% +7.47% 🟢
catalog-jdbc-postgresql 82.29% 🟢
catalog-jdbc-starrocks 78.51% 🟢
catalog-kafka 77.01% 🟢
catalog-lakehouse-generic 59.18% 🟢
catalog-lakehouse-hudi 79.1% 🟢
catalog-lakehouse-iceberg 86.48% 🟢
catalog-lakehouse-paimon 84.25% 🟢
catalog-model 77.72% 🟢
cli 44.5% 🟢
client-java 78.29% 🟢
common 51.95% 🟢
core 82.53% 🟢
filesystem-hadoop3 77.3% 🟢
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.29% 🟢
iceberg-common 63.63% 🟢
iceberg-rest-server 74.9% 🟢
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.97% 🟢
server-common 75.78% 🟢
spark 28.57% 🔴
spark-common 46.01% 🟢
tencent 69.84% 🟢
trino-connector 40.29% 🟢
Files
Module File Coverage
catalog-jdbc-clickhouse ClickHouseTableOperations.java 85.75% 🟢
catalog-jdbc-common JdbcTableOperations.java 56.11% 🔴
JdbcTypeConverter.java 55.17% 🔴
catalog-jdbc-oceanbase OceanBaseTableOperations.java 83.6% 🟢

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.

[Subtask] Validate JDBC type mappings before table DDL

1 participant