zhengxiang378928908-code opened a new issue, #11688:
URL: https://github.com/apache/seatunnel/issues/11688

   ### Search before asking
   
   - [X] I had searched in the 
[issues](https://github.com/apache/seatunnel/issues?q=is%3Aissue+label%3A%22bug%22)
 and found no similar issues.
   
   ### What happened
   
   `DmdbTypeConverter` has cases for `CHAR`, `CHARACTER`, `VARCHAR`, `VARCHAR2` 
and `NVARCHAR`, but no case for `NCHAR`. Reading a Dameng table that contains 
`NCHAR` columns falls through to the `default` branch and throws:
   
   ```
   ErrorCode:[COMMON-17], ErrorDescription:['Dameng' unsupported convert type 
'nchar' of 'test' to SeaTunnel data type.]
   ```
   
   In a multi-table job the catalog aggregates these into `COMMON-21` and the 
job fails before any data is read.
   
   `NCHAR` is a standard Dameng type — the fixed-length national character 
type, and the counterpart of the already supported variable-length `NVARCHAR`. 
Supporting `NVARCHAR` but not `NCHAR` looks like an oversight rather than an 
intentional restriction.
   
   This is the same class of gap as #10635 (`NVARCHAR2`). It likely went 
unnoticed because `JdbcDmIT` covers `CHAR`, `CHARACTER`, `VARCHAR` and 
`VARCHAR2` but no national character type at all.
   
   ### SeaTunnel Version
   
   dev
   
   ### SeaTunnel Config
   
   ```conf
   Reproduced directly at the converter level, no server required:
   
   DmdbTypeConverter.INSTANCE.convert(
       BasicTypeDefine.builder()
           
.name("test").columnType("nchar(2)").dataType("nchar").length(2L).build());
   ```
   
   ### Running Command
   
   ```shell
   ./mvnw test -pl seatunnel-connectors-v2/connector-jdbc 
-Dtest=DmdbTypeConverterTest
   ```
   
   ### Error Exception
   
   ```log
   org.apache.seatunnel.common.exception.SeaTunnelRuntimeException: 
ErrorCode:[COMMON-17],
   ErrorDescription:['Dameng' unsupported convert type 'nchar' of 'test' to 
SeaTunnel data type.]
   ```
   
   ### Zeta or Flink or Spark Version
   
   Zeta
   
   ### Java or Scala Version
   
   Java 8
   
   ### Screenshots
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [X] Yes I am willing to submit a PR!
   
   ### 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