mchades opened a new pull request, #11211:
URL: https://github.com/apache/gravitino/pull/11211
### What changes were proposed in this pull request?
- Added native UUID mapping in PostgreSqlTypeConverter:
- PostgreSQL uuid -> Gravitino UUIDType
- Gravitino UUIDType -> PostgreSQL uuid
- Added Spark UUID handling in SparkTypeConverter:
- UUIDType -> Spark StringType, so schema conversion no longer fails in
Spark connector paths.
- Extended existing tests (without creating new test methods where possible):
- PostgreSQL converter unit tests
- Spark converter unit tests
- PostgreSQL integration test assertion for uuid column type
- Updated PostgreSQL JDBC catalog docs to include UUID mapping support.
### Why are the changes needed?
Issue #11192 reports failures around UUID type handling, where UUID could be
treated as unresolved and break Spark-side type conversion flows (for example
metadata/schema paths used by SHOW CREATE TABLE).
This patch makes UUID a first-class mapped type for PostgreSQL and ensures
Spark converter can consume it safely.
Fix: #11192
### Does this PR introduce _any_ user-facing change?
Yes.
- PostgreSQL uuid columns are now recognized as Gravitino UUIDType instead
of unresolved external type in this path.
- Spark connector can convert UUIDType to Spark schema (StringType),
avoiding unsupported type errors.
- PostgreSQL catalog type mapping documentation now lists UUID support.
### How was this patch tested?
- ./gradlew :catalogs:catalog-jdbc-postgresql:spotlessApply
- ./gradlew :spark-connector:spark-common:spotlessApply
- ./gradlew :catalogs:catalog-jdbc-postgresql:test --tests
org.apache.gravitino.catalog.postgresql.converter.TestPostgreSqlTypeConverter
-PskipITs -PskipDockerTests=true
- ./gradlew :spark-connector:spark-common:test --tests
org.apache.gravitino.spark.connector.TestSparkTypeConverter -PskipITs
-PskipDockerTests=true
- Docker image check passed for postgres:13
- ./gradlew :catalogs:catalog-jdbc-postgresql:test --tests
org.apache.gravitino.catalog.postgresql.integration.test.CatalogPostgreSqlIT
-PskipDockerTests=false
--
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]