Skip to content

[#13969] fix(jdbc): Escape Doris and StarRocks partition values - #13970

Merged
yuqi1129 merged 1 commit into
apache:mainfrom
yuqi1129:fix/doris-starrocks-partition-literals
Oct 20, 2026
Merged

yuqi1129 merged 1 commit into
apache:mainfrom
yuqi1129:fix/doris-starrocks-partition-literals

Conversation

@yuqi1129

Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

Escape Doris and StarRocks range bounds and list partition values with the existing JDBC SQL literal helper. Apply it to both single-column list values and multi-column tuples; the shared rendering paths cover table creation and partition addition.

Why are the changes needed?

Double quotes in a partition value currently break generated DDL, and backslashes can change the value parsed by the database.

Fix: #13969

Does this PR introduce any user-facing change?

Quoted partition values preserve double quotes and backslashes. Existing MAXVALUE handling and ordinary numeric/date rendering remain unchanged. This patch does not add new supported partition types or change StarRocks range-bound semantics.

How was this patch tested?

  • Full Doris and StarRocks non-Docker unit suites: 111 and 44 tests passed.
  • Parameterized literal regressions cover quotes, backslashes, quote/backslash combinations, SQL-looking text, and whitespace; existing numeric/date/MAXVALUE cases remain covered.
  • Production create-table and add-partition entry points are checked for range, single-column list, and multi-column list SQL.
  • Doris and StarRocks Docker partition suites: 4 tests passed for each dialect. New regressions create and add list partitions, insert the original values, and query them back for single- and multi-column partitioning; existing range/list regressions also pass.
  • Mutation checks revert each dialect fix: all 7 escaping-dependent regression cases fail for each dialect, while the whitespace-only case remains unchanged.
  • Spotless checks for both modules.

Copilot AI balanced review requested due to automatic review settings October 20, 2026 03:43

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@github-actions

Copy link
Copy Markdown

Code Coverage Report

Overall Project 72.29% +0.07% 🟢
Files changed 92.67% 🟢

Module Coverage
aliyun 19.74% 🔴
api 55.09% 🟢
authorization-common 85.96% 🟢
authorization-ranger 14.44% 🔴
aws 60.78% 🟢
aws-bundle 0.0% 🔴
azure 68.04% 🟢
azure-bundle 0.0% 🔴
catalog-common 29.49% 🔴
catalog-fileset 82.37% 🟢
catalog-glue 73.24% 🟢
catalog-hive 84.5% 🟢
catalog-jdbc-common 57.98% 🟢
catalog-jdbc-doris 87.94% +0.76% 🟢
catalog-jdbc-mysql 81.91% 🟢
catalog-jdbc-postgresql 83.76% 🟢
catalog-jdbc-starrocks 79.72% +2.11% 🟢
catalog-kafka 75.21% 🟢
catalog-lakehouse-generic 86.91% 🟢
catalog-lakehouse-hudi 79.1% 🟢
catalog-lakehouse-iceberg 86.8% 🟢
catalog-lakehouse-paimon 84.36% 🟢
catalog-model 77.99% 🟢
cli 44.62% 🟢
client-java 79.44% 🟢
client-java-runtime 0.0% 🔴
common 60.9% 🟢
core 87.55% 🟢
filesystem-hadoop3 76.89% 🟢
flink 55.44% 🟢
flink-common 32.2% 🔴
flink-runtime 0.0% 🔴
gcp 32.2% 🔴
hadoop-auth 68.0% 🟢
hadoop-common 17.84% 🔴
hive-metastore-common 62.3% 🟢
hive-metastore3-libs 58.8% 🟢
iceberg-aliyun-bundle 0.0% 🔴
iceberg-common 67.14% 🟢
iceberg-rest-server 77.45% 🟢
idp-basic 86.99% 🟢
integration-test-common 0.0% 🔴
jobs 71.35% 🟢
k8s-job-executor 97.81% +0.29% 🟢
lance-common 40.73% 🟢
lance-rest-server 68.04% 🟢
lineage 59.39% 🟢
optimizer 84.2% 🟢
optimizer-api 46.58% 🟢
server 91.44% 🟢
server-common 84.0% 🟢
spark 63.29% 🟢
tencent 81.78% 🟢
tms 80.04% 🟢
trino-connector 64.88% 🟢
Files
Module File Coverage
catalog-jdbc-doris DorisUtils.java 95.76% 🟢
catalog-jdbc-starrocks StarRocksUtils.java 86.56% 🟢
k8s-job-executor SparkApplicationUtils.java 100.0% 🟢

@yuqi1129 yuqi1129 added the branch-1.3 Automatically cherry-pick commit to branch-1.3 label Oct 20, 2026
@yuqi1129
yuqi1129 merged commit f512842 into apache:main Oct 20, 2026
43 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

branch-1.3 Automatically cherry-pick commit to branch-1.3

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug report] Doris and StarRocks partition values are not escaped

3 participants