sachinnn99 opened a new pull request, #10970:
URL: https://github.com/apache/gravitino/pull/10970
### What changes were proposed in this pull request?
Add type mappings for PostgreSQL's `serial`, `smallserial`, and `bigserial`
type aliases (and their shorthand forms `serial2`, `serial4`, `serial8`) in
`PostgreSqlTypeConverter.toGravitino()`.
### Why are the changes needed?
When the JDBC driver reports `serial`/`smallserial`/`bigserial` as the
TYPE_NAME, the converter falls through to `ExternalType.of("serial")`. The
Trino connector has no mapping for `EXTERNAL` types, causing queries to fail
with:
```
Unsupported gravitino datatype: external(serial)
```
These types are aliases for `int2`/`int4`/`int8` with an auto-increment
sequence, so they should map to `ShortType`/`IntegerType`/`LongType`
respectively.
Fix: #10957
### Does this PR introduce _any_ user-facing change?
No API changes. PostgreSQL tables with serial columns can now be queried
through Trino without errors.
### How was this patch tested?
Added unit test assertions for all 6 serial type variants in
`TestPostgreSqlTypeConverter.testToGravitinoType()`.
--
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]