hutiefang76 opened a new issue, #12878:
URL: https://github.com/apache/seatunnel/issues/12878

   ### Search before asking
   - [x] I searched the existing issues and open/closed PRs. #11485 concerns 
timestamp-with-time-zone mapping and #11493 adds a JSON logical type; neither 
addresses the unsupported-type fallback.
   
   ### What happened
   The generic JDBC mapper returns a `PhysicalColumn` with a null SeaTunnel 
type for unsupported JDBC types. This bypasses the existing catalog error 
aggregation, so callers receive an invalid schema rather than an error naming 
the unsupported column and database type.
   
   I reproduced this through `CatalogUtils.getCatalogTable(ResultSetMetaData, 
new GenericTypeMapper(), query)` on current dev. The metadata has `id INTEGER`, 
`payload STRUCT`, and `name VARCHAR`. The supported columns map normally, but 
the call returns without an exception and the payload column has no mapped 
type. The existing catalog contract can aggregate unsupported columns when 
converters throw `CONVERT_TO_SEATUNNEL_TYPE_ERROR_SIMPLE`.
   
   ### SeaTunnel Version
   Current dev, e2957d27afa29d4de4324cf642450757d865b902.
   
   ### SeaTunnel Config
   Not an engine job reproduction. This is a regression test of query schema 
discovery with the real generic type mapper and mocked JDBC metadata. No 
credentials or external service are used for this reproduction.
   
   ### Running Command
   ```shell
   ./mvnw -B -pl seatunnel-connectors-v2/connector-jdbc -am 
-Dtest=CatalogUtilsTest -Dsurefire.failIfNoSpecifiedTests=false package
   ```
   The added assertion expects an aggregated unsupported-type error containing 
`payload` and `STRUCT`; the supported INTEGER/VARCHAR case is a control.
   
   ### Error Exception
   ```text
   CatalogUtilsTest: 18 tests, 1 failure, 0 errors, 0 skipped
   Expected org.apache.seatunnel.common.exception.SeaTunnelRuntimeException to 
be thrown, but nothing was thrown.
   ```
   The failure is the missing error, rather than a database connection or build 
failure.
   
   ### Java or Scala Version
   Java 17.
   
   ### Are you willing to submit PR?
   - [x] Yes. I will make the generic converter report the unsupported column 
using the existing conversion error contract, add a real PostgreSQL metadata 
regression to the existing JDBC IT, and retain the current supported mappings. 
No new type support, public API, or configuration change is proposed.
   
   ### Code of Conduct
   - [x] I agree to follow this project's [Code of 
Conduct](https://www.apache.org/foundation/policies/conduct).
   


-- 
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]

Reply via email to