You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@seatunnel.apache.org by "zhang-arvin (via GitHub)" <gi...@apache.org> on 2026/08/18 16:53:33 UTC

[PR] [Fix][Connector-V2] Add Dameng NCHAR type support in type converter [seatunnel]

zhang-arvin opened a new pull request, #11860:
URL: https://github.com/apache/seatunnel/pull/11860

   ## Purpose
   
   Fixes #11688.
   
   `DmdbTypeConverter` handles `CHAR`, `CHARACTER`, `VARCHAR`, `VARCHAR2` and `NVARCHAR`, but not `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.]
   ```
   
   `NCHAR` is the fixed-length national character type, and the counterpart of the already supported variable-length `NVARCHAR`. Supporting `NVARCHAR` but not `NCHAR` is an oversight.
   
   ## Changes
   
   - Added `DM_NCHAR = "NCHAR"` constant in `DmdbTypeConverter`
   - Added `case DM_NCHAR:` in the `convert` method, mapping to `STRING` type with `charTo4ByteLength` for column length (same treatment as other fixed-length character types)
   - Added `testConvertNchar` unit test in `DmdbTypeConverterTest`
   
   ## Testing
   
   ```
   ./mvnw test -pl seatunnel-connectors-v2/connector-jdbc -Dtest=DmdbTypeConverterTest
   Tests run: 35, Failures: 0, Errors: 0, Skipped: 0
   ```
   
   ## Checklist
   
   - [x] No new dependency added
   - [x] No documentation change needed (type mapping is internal)
   - [x] Backward compatible
   - [x] Spotless formatting applied


-- 
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: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [Fix][Connector-V2] Add Dameng NCHAR type support in type converter [seatunnel]

Posted by "zhang-arvin (via GitHub)" <gi...@apache.org>.
zhang-arvin closed pull request #11860: [Fix][Connector-V2] Add Dameng NCHAR type support in type converter
URL: https://github.com/apache/seatunnel/pull/11860


-- 
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: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [Fix][Connector-V2] Add Dameng NCHAR type support in type converter [seatunnel]

Posted by "zhang-arvin (via GitHub)" <gi...@apache.org>.
zhang-arvin commented on PR #11860:
URL: https://github.com/apache/seatunnel/pull/11860#issuecomment-5411477765

   Closed: superseded by #11693


-- 
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: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org