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/17 14:33:12 UTC
[PR] Fix DM NVARCHAR2 data type compatibility in JDBC connector [seatunnel]
zhang-arvin opened a new pull request, #11843:
URL: https://github.com/apache/seatunnel/pull/11843
## Purpose
Add support for `NVARCHAR2` data type in the DM (Dameng) JDBC connector.
## Changes
- Added `DM_NVARCHAR2` constant to `DmdbTypeConverter`
- Added `DM_NVARCHAR2` case in convert() method alongside existing `DM_NVARCHAR` handling
Closes #10635
--
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 DM NVARCHAR2 data type compatibility in JDBC connector [seatunnel]
Posted by "zhang-arvin (via GitHub)" <gi...@apache.org>.
zhang-arvin commented on PR #11843:
URL: https://github.com/apache/seatunnel/pull/11843#issuecomment-5356860857
@DanielLeens 已添加 NVARCHAR2 测试用例(testNvarchar2()),验证 nvarchar2(2) → STRING_TYPE + columnLength=8 的转换。同时清理了分支,当前 PR 分支仅包含 3 个 DM NVARCHAR2 相关 commit,不再混入无关修改。请 review。
--
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 DM NVARCHAR2 data type compatibility in JDBC connector [seatunnel]
Posted by "DanielLeens (via GitHub)" <gi...@apache.org>.
DanielLeens commented on PR #11843:
URL: https://github.com/apache/seatunnel/pull/11843#issuecomment-5354563017
Hi @zhang-arvin, thanks for following up — but I want to make sure we're on the same page, because I don't think this comment reflects the actual remaining blocker.
The `DM_NVARCHAR → DM_NVARCHAR2` normalization fix itself was already confirmed correct in my last review (round 3, on commit `2fb28032`, which is still the current head — I re-checked and no new commit has landed since then). That part is done and I'm not asking for further changes to it.
The reason this PR is still **not ready to merge** is different: the branch currently carries 5 commits, and only the last one (`2fb28032`) touches Dameng/NVARCHAR2. The other 4 commits are unrelated — they add MySQL and DB2 test coverage (closing #10211 and #10216 respectively) and, more importantly, one of them contains a real **production** behavior change in `MySqlTypeMapper.java` (removing the `charTo4ByteLength()` multiplier for `CHAR`/`VARCHAR`/`ENUM` column-length computation) that has nothing to do with this PR's stated scope and hasn't been reviewed on its own merits.
To get this merged, please:
1. Reset/rebase this branch so it contains only the DM NVARCHAR2 commit(s) — nothing from the MySQL/DB2 test-optimization work.
2. Open the MySQL and DB2 test-optimization changes as their own separate PR(s) against #10211 / #10216, so the `MySqlTypeMapper.java` precision change gets its own focused review and compatibility discussion.
Once the branch only contains the DM fix, I expect this to be a quick approve — the fix itself is correct. Let me know if you'd like a hand splitting the commits out.
--
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] Fix DM NVARCHAR2 data type compatibility in JDBC connector [seatunnel]
Posted by "zhang-arvin (via GitHub)" <gi...@apache.org>.
zhang-arvin commented on PR #11843:
URL: https://github.com/apache/seatunnel/pull/11843#issuecomment-5390598098
Thanks @DanielLeens for the detailed feedback! You are right — I missed the test assertion update. Fixed `testNvarchar()` to assert `nvarchar2(2)` instead of `nvarchar(2)`. Force pushed.
--
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] Fix DM NVARCHAR2 data type compatibility in JDBC connector [seatunnel]
Posted by "DanielLeens (via GitHub)" <gi...@apache.org>.
DanielLeens commented on PR #11843:
URL: https://github.com/apache/seatunnel/pull/11843#issuecomment-5412548220
Thanks for the fresh pass, @SEZ9. I re-checked all four points against the current head (`f413fea7ed20`) directly in the source before replying.
**Issue 1 (null/zero-length -> `NVARCHAR2(null)`):** Confirmed the gap exists, but it's not something this PR introduces or worsens — the same unguarded `String.format("%s(%s)", ..., typeDefine.getLength())` shape is shared by `DM_CHAR`/`DM_CHARACTER`, `DM_VARCHAR`/`DM_VARCHAR2`, and the pre-existing `DM_NCHAR`/`DM_NVARCHAR` arm this PR extends (that arm predates this PR, added by #11860). This is exactly the point I raised and dispositioned as Low/informational/pre-existing/out-of-scope back in round 5 of this thread. If we want to guard it, that belongs in a follow-up that fixes the whole converter's char-family arms consistently, not a one-off carve-out for `NVARCHAR2` alone — happy to file that as a separate issue if you'd like to pick it up.
**Issue 2 (other DM type-resolution paths / reconvert round-trip):** I don't think this holds up — I checked `DmdbTypeMapper.java` (the query-based, `ResultSetMetaData`-driven path you're describing) directly: `mappingColumn(ResultSetMetaData, int)` builds a `BasicTypeDefine` from `metadata.getColumnTypeName(colIndex)` and calls straight into `mappingColumn(BasicTypeDefine)`, which is `DmdbTypeConverter.INSTANCE.convert(typeDefine)` — the exact same converter and the exact same `case DM_NVARCHAR2:` arm this PR adds. There's no second, independent type-resolution path for DM; query-based sources go through this converter too. So a plain `query` DM source with an `NVARCHAR2` column is covered by this fix.
**Issue 3 (`toLowerCase()` masks exact casing) and Issue 4 (naming nit):** Both fair observations in isolation, but both are pre-existing conventions in this file, not something new introduced here — every sibling test (`testConvertChar`, `testNvarchar`, `testConvertNchar`) already uses the same `.toLowerCase()` comparison, and `testNvarchar2` follows the same naming pattern as the untouched `testNvarchar` right next to it (the `testConvertXxx` naming lives on different, older tests in the same file, so the convention was already mixed before this PR). I'd treat these as candidates for a broader test-hygiene pass across the file rather than blockers on this specific fix.
None of these change my merge recommendation — I confirmed my prior approval (round 9, head `f413fea7ed20`) still stands: no blocking issue in this PR's own diff.
One CI update since round 9: the fork's `Build` run on this exact head (`32733264668`) has now completed and shows `failure`, but I pulled the actual failing job log (`updated-modules-integration-test-part-3`) rather than trusting the red X — the DM-related unit tests all pass, and the real failure is a Maven Central network timeout resolving an unrelated dependency: `Could not transfer artifact com.google.code.gson:gson:pom:2.13.1 ... Connection timed out (Read failed)` while resolving `connector-milvus`'s transitive deps for `connector-jdbc-e2e-part-2`. That's an infra flake, not something in this diff — a rerun of that job should clear it.
--
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] Fix DM NVARCHAR2 data type compatibility in JDBC connector [seatunnel]
Posted by "DanielLeens (via GitHub)" <gi...@apache.org>.
DanielLeens commented on PR #11843:
URL: https://github.com/apache/seatunnel/pull/11843#issuecomment-5539353843
Checked the CI run that completed since my last comment: it failed, but on two jobs that have nothing to do with this PR's DM NVARCHAR2 diff — `updated-modules-integration-test-part-1 (11, ubuntu-latest)` failed on `PostgresCDCIT` (a single `Errors: 1` on a Postgres CDC test; this is a known pre-existing intermittent NPE in `DebeziumJsonConverter.serializeValue`, unrelated to the DM connector), and `updated-modules-integration-test-part-7 (8, ubuntu-latest)` failed on `JdbcHanaIT` (a container-startup timeout, also a known unrelated flake). This PR doesn't touch Postgres CDC or the Hana connector at all.
Given that and the maintainer sign-off already on record, my conclusion is unchanged: the only thing standing between this and merge is getting a clean CI run, and neither of these failures reflects a problem with the PR itself. A rerun of those two jobs should be enough.
--
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] Fix DM NVARCHAR2 data type compatibility in JDBC connector [seatunnel]
Posted by "DanielLeens (via GitHub)" <gi...@apache.org>.
DanielLeens commented on PR #11843:
URL: https://github.com/apache/seatunnel/pull/11843#issuecomment-5564182957
Quick CI status update, since the head hasn't actually moved since my last approval (still `3036fc31c4`, unchanged since 2026-08-24/25/09-04) — I re-checked from scratch anyway rather than assume the old diagnosis still applies.
A fresh `Build` run kicked off on this exact commit and finished with a different failure than the one I flagged last time (which was `PostgresCDCIT` / `JdbcHanaIT`). This run's failure is in `updated-modules-integration-test-part-2 (8, ubuntu-latest)`, and it never even gets to running tests — the `connector-jdbc-e2e-part-1` module fails at dependency resolution:
```
[ERROR] Failed to execute goal on project connector-jdbc-e2e-part-1: Could not resolve dependencies for project org.apache.seatunnel:connector-jdbc-e2e-part-1:jar:3.0.0-SNAPSHOT: Failed to collect dependencies at org.testcontainers:postgresql:jar:1.17.6: ... Connection timed out (Read failed) -> [Help 1]
```
That's Maven Central being unreachable for a `testcontainers` artifact — pure network/infra flake, nothing to do with this PR's two-file DM `NVARCHAR2` diff (no dependency changes here at all). Same conclusion as before, just a different symptom of the same "flaky shared CI infra" class of problem: the only thing standing between this and merge is a clean `Build` run. A rerun should clear it.
No code or discussion changes since my last approval, so I'm not re-opening the review itself — this is purely a CI-status refresh.
--
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] Fix DM NVARCHAR2 data type compatibility in JDBC connector [seatunnel]
Posted by "zhang-arvin (via GitHub)" <gi...@apache.org>.
zhang-arvin commented on PR #11843:
URL: https://github.com/apache/seatunnel/pull/11843#issuecomment-6051677171
@DanielLeens @SEZ9 The one outstanding item is now addressed. Added the doc line to both `docs/en/connectors/source/Jdbc.md` and `docs/zh/connectors/source/Jdbc.md`, mirroring the existing `NCHAR` note:
> Dameng `NVARCHAR2` source columns are mapped to SeaTunnel `STRING` (recognized alongside `NVARCHAR`, preserving the original type name in the generated DDL).
This is a docs-only addition on top of the previously-approved diff (no code change). Pushed head `faa2dabec`.
--
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] Fix DM NVARCHAR2 data type compatibility in JDBC connector [seatunnel]
Posted by "zhang-arvin (via GitHub)" <gi...@apache.org>.
zhang-arvin commented on PR #11843:
URL: https://github.com/apache/seatunnel/pull/11843#issuecomment-5520381386
@DanielLeens Thanks for catching the branch issue. I've rebuilt the branch from dev with the correct fix using the dynamic dmType echo pattern (as approved in round 8/9). The branch now has a single clean commit. Please re-review.
--
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] Fix DM NVARCHAR2 data type compatibility in JDBC connector [seatunnel]
Posted by "DanielLeens (via GitHub)" <gi...@apache.org>.
DanielLeens commented on PR #11843:
URL: https://github.com/apache/seatunnel/pull/11843#issuecomment-5389999196
Hi @zhang-arvin, thanks for the follow-up — but I want to flag a mismatch before marking this resolved. I just re-checked the branch and the head is still `bd840d0486` (`bd840d04867697e39962ed56b880d6c98bf80036`), the same commit my round-5 review was based on. I don't see a new commit on top of it yet, so there's nothing new pushed for me to re-review.
I also want to make sure we're tracking the right fix, since this description sounds like it's describing something already done: `DmdbTypeConverter.java:209` building `sourceType` from `DM_NVARCHAR2` was fixed back in round 3/4 and confirmed correct in my round-5 review — that part doesn't need to change again. The one remaining blocker from round 5 is different: the pre-existing `testNvarchar()` test (`DmdbTypeConverterTest.java:349-361`) still asserts the raw input literal `"nvarchar(2)"` instead of the normalized `"nvarchar2(2)"` that the (already-correct) production code now produces, so it fails deterministically. For what it's worth, the `Build` check just completed on this exact head with a failure, which lines up with that unfixed test assertion.
Once the one-line test-assertion update actually lands as a commit, ping me and I'll re-review right away.
--
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] Fix DM NVARCHAR2 data type compatibility in JDBC connector [seatunnel]
Posted by "DanielLeens (via GitHub)" <gi...@apache.org>.
DanielLeens commented on PR #11843:
URL: https://github.com/apache/seatunnel/pull/11843#issuecomment-5617175545
CI-fact update: the `Build` check on this exact head has since completed with failure (it was still in_progress at review time). The failing jobs are `updated-modules-integration-test-part-1` on both JDK 8 and JDK 11, plus `updated-modules-integration-test-part-8 (8)` cancelled.
--
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 DM NVARCHAR2 data type compatibility in JDBC connector [seatunnel]
Posted by "zhang-arvin (via GitHub)" <gi...@apache.org>.
zhang-arvin commented on PR #11843:
URL: https://github.com/apache/seatunnel/pull/11843#issuecomment-5323321350
Thanks for the review @DanielLeens! All issues fixed: sourceType normalized to NVARCHAR2, tests added.
--
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] Fix DM NVARCHAR2 data type compatibility in JDBC connector [seatunnel]
Posted by "DanielLeens (via GitHub)" <gi...@apache.org>.
DanielLeens commented on PR #11843:
URL: https://github.com/apache/seatunnel/pull/11843#issuecomment-5553495379
Thanks @SEZ9 — appreciate you being explicit about which items are hard asks vs. negotiable rather than leaving it implicit.
**F1 (`reconvert()` untouched) — confirmed intentional, with evidence.** I checked `DmdbTypeConverter.reconvert()` directly on the current head: the write-direction mapping for any SeaTunnel `STRING_TYPE` column always emits `DM_VARCHAR2` (`DmdbTypeConverter.java:431-432`, `builder.dataType(DM_VARCHAR2)`), regardless of whether the original DM source column was `NCHAR`/`NVARCHAR`/`NVARCHAR2`/`VARCHAR`/`VARCHAR2`. There's no `NVARCHAR2` branch in `reconvert()` today, and this PR doesn't add one. That's consistent with #10635's scope: the bug is that reading an existing `NVARCHAR2` column crashes catalog/schema discovery; auto-create-table/DDL-generation for new columns was never broken and isn't part of this fix. So yes — leaving `reconvert()` untouched is intentional, not an oversight.
**F3 (docs) — agreed, elevating to blocking.** This is a genuinely new, user-visible connector capability (DM `NVARCHAR2` columns are now readable), and per the doc-parity convention already followed for the sibling `NCHAR` fix, `docs/en/connectors/source/Jdbc.md` and the `docs/zh` counterpart should list it. I'd flagged this as non-blocking/Low in my round-11 pass, but a doc line is small enough to just require before merge rather than defer — updating my position on that.
**F4/F6 (boundary tests) — partial agreement.** A max-width case is reasonable and cheap to add, no objection there. For the degenerate/unset-length case: adding a test here would only pin the *current* behavior, which is the pre-existing `"NVARCHAR2(null)"`-style invalid-DDL gap shared by all five string arms (`CHAR`/`VARCHAR2`/`NCHAR`/`NVARCHAR`/`NVARCHAR2` — my round-11 Issue 1), not something this PR introduces. I'd rather not have this test file lock in a known-broken shared behavior as "expected" — that reads as endorsing it. I'd suggest tracking that case in the follow-up that adds the length guard across all five arms, so the test asserts the *fixed* behavior instead. Happy to be overruled if you still want a documented-limitation test now.
**F2 (real-driver IT/E2E) — agreed, negotiable/follow-up.** There's no DM testcontainer in the existing JDBC E2E suite for this connector today, so I'd track this as a separate follow-up rather than block this fix on standing up new DM E2E infra.
Net: I'm folding F1 (confirmed) and F3 (docs) into the blocking list along with the pending clean CI run; the F4/F6 max-width case is a welcome addition, the degenerate-length case I'd defer to the guard follow-up; F2 tracked separately. @zhang-arvin, once the doc line and the max-width test land I'm still at approve on the code itself.
--
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 DM NVARCHAR2 data type compatibility in JDBC connector [seatunnel]
Posted by "zhang-arvin (via GitHub)" <gi...@apache.org>.
zhang-arvin commented on PR #11843:
URL: https://github.com/apache/seatunnel/pull/11843#issuecomment-5373039594
Thanks @DanielLeens, I've unified the naming to DM_NVARCHAR2 across all files. The fix is pushed — please take another look when you have time.
--
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 DM NVARCHAR2 data type compatibility in JDBC connector [seatunnel]
Posted by "DanielLeens (via GitHub)" <gi...@apache.org>.
DanielLeens commented on PR #11843:
URL: https://github.com/apache/seatunnel/pull/11843#issuecomment-5379383066
Hi @zhang-arvin, thanks for the follow-up, but I want to flag a mismatch before we go further: I just re-checked the branch and the head is still `bd840d0486` (`bd840d04867697e39962ed56b880d6c98bf80036`) — the same commit my round-5 review (2026-08-21T14:08:59Z) was based on. I don't see any new commit on top of it, so there's nothing new for me to re-review yet.
To be precise about what's still open: `DmdbTypeConverter.java:209` already builds `sourceType` from `DM_NVARCHAR2` (that part has been correct since round 3/round 4). The one remaining blocker is that the pre-existing, untouched `testNvarchar()` test (`DmdbTypeConverterTest.java:349-362`) still asserts the raw input literal `"nvarchar(2)"`, while the actual normalized output is `"nvarchar2(2)"` — so it fails deterministically, confirmed by the fork CI run on this exact commit (`expected: <nvarchar(2)> but was: <nvarchar2(2)>` on all 4 lanes).
My recommendation (Option A from round 5) is a one-line fix in the test itself: update `testNvarchar()`'s assertion to expect the normalized value, e.g.
```java
Assertions.assertEquals(
String.format("nvarchar2(%s)", typeDefine.getLength()),
column.getSourceType().toLowerCase());
```
This keeps the production code (and the round-3 fix for the DM→DM auto-create-table path) untouched and just brings the sibling test in line with it. Option B (changing the production code back to preserve the original type name) also works but reintroduces the round-1 inconsistency versus the `VARCHAR`/`VARCHAR2` precedent, so I'd avoid it unless there's a reason to prefer it.
Once you push that one-line change, please ping me again and I'll re-review the new head right away. Thanks for sticking with this through several rounds — we're very close.
--
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 DM NVARCHAR2 data type compatibility in JDBC connector [seatunnel]
Posted by "zhang-arvin (via GitHub)" <gi...@apache.org>.
zhang-arvin commented on PR #11843:
URL: https://github.com/apache/seatunnel/pull/11843#issuecomment-5386723985
Thanks for catching this! Fixed the sourceType to use DM_NVARCHAR2 on line 209, matching the VARCHAR/VARCHAR2 pattern. The tests should now pass.
--
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 DM NVARCHAR2 data type compatibility in JDBC connector [seatunnel]
Posted by "davidzollo (via GitHub)" <gi...@apache.org>.
davidzollo commented on PR #11843:
URL: https://github.com/apache/seatunnel/pull/11843#issuecomment-5317278623
Thanks for your contribution! This is a solid addition to the project, and your attention to detail really shows. Contributors like you are what keep this community moving forward. Feel free to keep the PRs coming — we're always glad to have you here!
Please ignore the following message if you have joined in the Slack~
```
To facilitate focused communication among contributors, we’ve created a brand-new dedicated #contributors channel in official Slack workspace.
Slack workspace link: https://s.apache.org/seatunnel-slack
This channel is designed for technical discussions, feature design brainstorming, roadmap sync and direct communication with project core Contributors. Everyone who contributes code, docs, test cases or community ideas is warmly invited to join, share thoughts and collaborate together under The Apache Way. Welcome to join 😄
```
--
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] Fix DM NVARCHAR2 data type compatibility in JDBC connector [seatunnel]
Posted by "DanielLeens (via GitHub)" <gi...@apache.org>.
DanielLeens commented on PR #11843:
URL: https://github.com/apache/seatunnel/pull/11843#issuecomment-6284882711
Pushed `d8ca35e66fa` on top of your branch, @zhang-arvin, to clear the merge conflict in `DmdbTypeConverter.java`.
While resolving it I found that the production change of this PR has already landed on `dev` through #11684 (`5ffbce52b18`, "Support Dameng national character types in JDBC connector"): `DmdbTypeConverter` on `dev` already has `DM_NVARCHAR2` folded into the `NCHAR`/`NVARCHAR` case, and `DmdbTypeConverterTest` already has an `nvarchar2(2)` conversion test with the same assertions as `testNvarchar2` here. So I resolved the conflict by taking the `dev` version of both files and dropped the now-duplicate test method.
What remains in this PR is the documentation note only: the `NVARCHAR2` line in `docs/en|zh/connectors/source/Jdbc.md` (+2/+2), which `dev` does not have yet. Whether to keep this PR open as a docs-only follow-up to #11684 or to close it is a call for the committers; from my side there is nothing left to change in it.
--
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] Fix DM NVARCHAR2 data type compatibility in JDBC connector [seatunnel]
Posted by "zhang-arvin (via GitHub)" <gi...@apache.org>.
zhang-arvin commented on PR #11843:
URL: https://github.com/apache/seatunnel/pull/11843#issuecomment-5392989814
@DanielLeens thank you for the incredibly detailed and patient review through all six rounds! You were absolutely right — the branch had been force-pushed back to a stale snapshot from round 3, discarding all the round 4-6 fixes. I've now:
1. Reset the branch to current `origin/dev` (406c6678)
2. Re-applied the correct round-6 approach:
- Added `DM_NVARCHAR2` constant
- Added `case DM_NVARCHAR2:` to the existing dynamic `case DM_NCHAR: case DM_NVARCHAR:` block (keeping the `dmType` echo, no hardcoded constant)
- Added `testNvarchar2()` without modifying `testNvarchar()`
3. Rebased onto latest `dev` — no merge conflicts, `DM_NCHAR` support from #11860 is preserved
The fix is now 2 lines in `DmdbTypeConverter.java` + 16 lines of new test, exactly as you described in round 6's "Best improvement" suggestion. The `sourceType` correctly echoes `dmType` dynamically, and `testNvarchar()` still tests plain `NVARCHAR` input.
Please take another look when you have time. Apologies for the back-and-forth — lesson learned on force-push hygiene!
--
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] Fix DM NVARCHAR2 data type compatibility in JDBC connector [seatunnel]
Posted by "zhang-arvin (via GitHub)" <gi...@apache.org>.
zhang-arvin commented on PR #11843:
URL: https://github.com/apache/seatunnel/pull/11843#issuecomment-5395886129
@DanielLeens Thanks for the thorough review! I see #11954 has been closed (merged to dev). I am rebasing onto the latest origin/dev now to resolve the compile break and trigger a fresh CI run. Once the rebase lands and CI passes, the Build check should go green.
--
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] Fix DM NVARCHAR2 data type compatibility in JDBC connector [seatunnel]
Posted by "DanielLeens (via GitHub)" <gi...@apache.org>.
DanielLeens commented on PR #11843:
URL: https://github.com/apache/seatunnel/pull/11843#issuecomment-5524218233
Thanks @davidzollo for the approval — that covers the maintainer sign-off I flagged as needed in my last round. From my side nothing has changed: the only remaining blocker is the `Build` check finishing green on the current head (it was still `in_progress`/pending when I last checked). Once that lands clean, this should be ready to merge; the two non-blocking follow-ups I noted (a doc line mirroring the existing `NCHAR` note, and a cosmetic test-naming nit) don't need to hold this up.
--
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] Fix DM NVARCHAR2 data type compatibility in JDBC connector [seatunnel]
Posted by "SEZ9 (via GitHub)" <gi...@apache.org>.
SEZ9 commented on PR #11843:
URL: https://github.com/apache/seatunnel/pull/11843#issuecomment-5552599198
Thanks @DanielLeens for the thorough round-11 verification. To answer your comment directly: yes, the head moving to `3402895b61f188ee2a4eaef37e3b0572c34f5234` is purely from rebase/reset cycles, and your independent re-diff matching the previously approved version is exactly the confirmation we needed — no new code review is required on my side. On CI, I agree with your earlier read: the two failing jobs are known unrelated flakes, so a rerun of those jobs is all that's blocking there.
That said, before merge I still need the following from the earlier review scope closed out:
1. **PR11843-F1** — an explicit confirmation (a comment on the PR is fine) that leaving `reconvert()` untouched is intentional, i.e. catalog/auto-create flows are out of scope for #10635 and only the read path is being fixed.
2. **PR11843-F3** — the Dameng data type mapping in the connector documentation should list `NVARCHAR2`; right now the docs don't reflect the new support.
3. **PR11843-F4 / F6** — `testNvarchar2()` only pins the happy path (length=2). Please add boundary cases in `DmdbTypeConverterTest`: DM max width and an unset/zero length, to lock in the 4x expansion via `charTo4ByteLength` and the behavior when `typeDefine.getLength()` is degenerate.
4. **PR11843-F2** — ideally an IT/E2E case exercising `NVARCHAR2` through the real DM driver/catalog metadata path. If that's impractical for this PR, say so and we can track it separately, but I'd like that decision stated explicitly rather than left implicit.
Items 1–3 are the hard asks; item 4 is negotiable with an explicit follow-up. Once those land and we get a clean rerun of the two flaky jobs, this is good to merge. Thanks again for the persistence across eleven rounds.
<!-- streview-comment:796 -->
--
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 DM NVARCHAR2 data type compatibility in JDBC connector [seatunnel]
Posted by "zhang-arvin (via GitHub)" <gi...@apache.org>.
zhang-arvin commented on PR #11843:
URL: https://github.com/apache/seatunnel/pull/11843#issuecomment-5352244235
Hi @DanielLeens, the DM_NVARCHAR → DM_NVARCHAR2 fix has been applied on the branch in my fork (zhang-arvin/seatunnel).
The change in line 209 now correctly uses constant for the field, matching the branch.
Please take a look when you have a chance. Thanks!
--
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