diqiu50 opened a new pull request, #13042: URL: https://github.com/apache/gravitino/pull/13042
### What changes were proposed in this pull request? Report a PostgreSQL `NUMERIC` without precision and scale as the external type `numeric`, and report array elements as nullable. Read external types as string in the Trino, Spark and Flink connectors. ### Why are the changes needed? An unconstrained `NUMERIC` holds values whose precision and scale vary per row, so `Decimal(38, 18)` claims bounds the source never declared. PostgreSQL array elements always accept NULL and cannot be declared otherwise. Once a common column type maps to an external type, a column carrying one reaches the connectors, where an unmapped type fails the type conversion of the whole table. Fix: #13040 ### Does this PR introduce _any_ user-facing change? Yes. An unconstrained `NUMERIC` is reported as the external type `numeric`, an array as a list with nullable elements, and a connector reads an external type as a string. A `numeric(p, s)[]` column becomes a list of the external type `numeric`, since array element metadata is not carried through. ### How was this patch tested? Unit tests in the PostgreSQL catalog and the three connectors, plus a PostgreSQL integration test against a real container. -- 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]
