Skip to content

[Cherry-pick to branch-1.3] [#9374] fix(spark): Fix MySQL datetime filter pushdown in Spark JDBC connector (#11451) - #11508

Merged
mchades merged 1 commit into
branch-1.3from
cherry-pick-eb2e2c90-to-branch-1.3
Jun 9, 2026
Merged

[Cherry-pick to branch-1.3] [#9374] fix(spark): Fix MySQL datetime filter pushdown in Spark JDBC connector (#11451)#11508
mchades merged 1 commit into
branch-1.3from
cherry-pick-eb2e2c90-to-branch-1.3

Conversation

@github-actions

@github-actions github-actions Bot commented Jun 9, 2026

Copy link
Copy Markdown

Cherry-pick Information:

  • Original commit: eb2e2c9
  • Target branch: branch-1.3
  • Status: ✅ Clean cherry-pick (no conflicts)

…connector (#11451)

### What changes were proposed in this pull request?

Map MySQL `datetime` to `TimestampType` in Spark JDBC type converters to
match Spark's native JDBC behavior.

### Why are the changes needed?

Filtering on MySQL `datetime` columns fails with
`SQLSyntaxErrorException: near ':07:43)'`. Gravitino maps `datetime` to
`TimestampNTZType` (Spark 3.4+), which the MySQL JDBC dialect cannot
format as valid SQL literals. Spark's native JDBC catalog maps
`datetime` → `TimestampType` correctly.

Fix: #9374

### Does this PR introduce _any_ user-facing change?

Yes. MySQL `datetime` columns can now be used as filter predicates via
Gravitino's Spark JDBC catalog.

### How was this patch tested?

Added unit tests: `TestSparkJdbcTypeConverter`,
`TestSparkJdbcTypeConverter34`, `TestSparkJdbcTypeConverter35`.
@github-actions github-actions Bot added the cherry-pick Automatically opened cherry-pick PR label Jun 9, 2026
@github-actions
github-actions Bot requested a review from jerryshao June 9, 2026 02:14
@yuqi1129 yuqi1129 closed this Jun 9, 2026
@yuqi1129 yuqi1129 reopened this Jun 9, 2026
@github-actions

github-actions Bot commented Jun 9, 2026

Copy link
Copy Markdown
Author

Code Coverage Report

Overall Project 67.04% -0.01% 🟢
Files changed 0.0% 🔴

Module Coverage
aliyun 1.72% 🔴
api 46.8% 🟢
authorization-common 85.96% 🟢
aws 3.66% 🔴
azure 2.47% 🔴
catalog-common 10.42% 🔴
catalog-fileset 80.35% 🟢
catalog-glue 67.41% 🟢
catalog-hive 79.35% 🟢
catalog-jdbc-clickhouse 80.02% 🟢
catalog-jdbc-common 45.31% 🟢
catalog-jdbc-doris 80.28% 🟢
catalog-jdbc-hologres 54.03% 🟢
catalog-jdbc-mysql 79.23% 🟢
catalog-jdbc-oceanbase 78.38% 🟢
catalog-jdbc-postgresql 82.29% 🟢
catalog-jdbc-starrocks 78.51% 🟢
catalog-kafka 77.01% 🟢
catalog-lakehouse-generic 58.53% 🟢
catalog-lakehouse-hudi 79.1% 🟢
catalog-lakehouse-iceberg 85.86% 🟢
catalog-lakehouse-paimon 79.29% 🟢
catalog-model 77.72% 🟢
cli 44.51% 🟢
client-java 77.91% 🟢
common 50.17% 🟢
core 82.51% 🟢
filesystem-hadoop3 76.97% 🟢
flink 0.0% 🔴
flink-common 46.3% 🟢
flink-runtime 0.0% 🔴
gcp 14.12% 🔴
hadoop-common 10.39% 🔴
hive-metastore-common 53.9% 🟢
iceberg-common 57.41% 🟢
iceberg-rest-server 73.8% 🟢
idp-basic 86.07% 🟢
integration-test-common 0.0% 🔴
jobs 66.17% 🟢
lance-common 20.81% 🔴
lance-rest-server 60.54% 🟢
lineage 53.02% 🟢
optimizer 82.95% 🟢
optimizer-api 21.95% 🔴
server 85.73% 🟢
server-common 73.28% 🟢
spark 28.57% -5.33% 🔴
spark-common 41.01% 🟢
trino-connector 39.97% 🔴
Files
Module File Coverage
spark SparkJdbcTypeConverter34.java 0.0% 🔴
GravitinoJdbcCatalogSpark35.java 0.0% 🔴

@mchades
mchades merged commit 115ad5a into branch-1.3 Jun 9, 2026
31 checks passed
@mchades
mchades deleted the cherry-pick-eb2e2c90-to-branch-1.3 branch June 9, 2026 03: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.

3 participants