LuciferYang opened a new pull request, #11424:
URL: https://github.com/apache/gravitino/pull/11424
### What changes were proposed in this pull request?
This PR updates the Spark JDBC type converter to map Gravitino timestamp
types to Spark `TimestampType` in Spark common.
It also adds unit tests for JDBC timestamp type conversion.
### Why are the changes needed?
Spark 3.3 does not expose `TimestampNTZType` as a normal production
timestamp type for this JDBC path. When PostgreSQL tables contain `timestamp
without time zone`, Gravitino maps it to `TimestampType{withTimeZone=false}`,
but Spark JDBC catalog schema rendering can fail because the common JDBC
converter did not handle Gravitino timestamp types.
Fix: #11231
### Does this PR introduce _any_ user-facing change?
No API or configuration changes.
This fixes Spark JDBC catalog behavior for timestamp columns.
### How was this patch tested?
```bash
./gradlew :spark-connector:spark-common:test \
--tests
"org.apache.gravitino.spark.connector.jdbc.TestSparkJdbcTypeConverter" \
-PskipITs \
-PskipDockerTests=true
```
```bash
./gradlew :spark-connector:spark-common:test \
--tests "org.apache.gravitino.spark.connector.TestSparkTypeConverter" \
-PskipITs \
-PskipDockerTests=true
```
Also ran:
```bash
git diff --check
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]