You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@seatunnel.apache.org by "MukjepScarlet (via GitHub)" <gi...@apache.org> on 2026/02/03 08:31:34 UTC

[I] [Bug] [connector-jdbc-sqlserver] SQLServer datetimeoffset should be mapped to OffsetDateTime instead of LocalDateTime [seatunnel]

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

   ### 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
   
   SqlServerTypeConverter.java
   ```java
               case SQLSERVER_DATETIMEOFFSET:
                   builder.sourceType(
                           String.format("%s(%s)", SQLSERVER_DATETIMEOFFSET, typeDefine.getScale()));
                   builder.dataType(LocalTimeType.LOCAL_DATE_TIME_TYPE);
                   builder.scale(typeDefine.getScale());
                   break;
   ```
   This is incorrect. Should be `LocalTimeType.OFFSET_DATE_TIME_TYPE`. Same in test.
   
   ### SeaTunnel Version
   
   latest
   
   ### SeaTunnel Config
   
   ```conf
   unrelated
   ```
   
   ### Running Command
   
   ```shell
   unrelated
   ```
   
   ### Error Exception
   
   ```log
   no exception
   ```
   
   ### Zeta or Flink or Spark Version
   
   _No response_
   
   ### Java or Scala Version
   
   17
   
   ### 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: commits-unsubscribe@seatunnel.apache.org.apache.org

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


Re: [I] [Bug] [connector-jdbc-sqlserver] SQLServer datetimeoffset should be mapped to OffsetDateTime instead of LocalDateTime [seatunnel]

Posted by "davidzollo (via GitHub)" <gi...@apache.org>.
davidzollo closed issue #10440: [Bug] [connector-jdbc-sqlserver] SQLServer datetimeoffset should be mapped to OffsetDateTime instead of LocalDateTime
URL: https://github.com/apache/seatunnel/issues/10440


-- 
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: [I] [Bug] [connector-jdbc-sqlserver] SQLServer datetimeoffset should be mapped to OffsetDateTime instead of LocalDateTime [seatunnel]

Posted by "zhang-arvin (via GitHub)" <gi...@apache.org>.
zhang-arvin commented on issue #10440:
URL: https://github.com/apache/seatunnel/issues/10440#issuecomment-5336318655

   I would like to work on this. Will submit a PR.


-- 
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: [I] [Bug] [connector-jdbc-sqlserver] SQLServer datetimeoffset should be mapped to OffsetDateTime instead of LocalDateTime [seatunnel]

Posted by "davidzollo (via GitHub)" <gi...@apache.org>.
davidzollo commented on issue #10440:
URL: https://github.com/apache/seatunnel/issues/10440#issuecomment-6376357009

   Closing this issue as completed after rechecking the original report and its resolution.
   
   SQL Server `DATETIMEOFFSET` now maps to `OFFSET_DATE_TIME_TYPE` / `OffsetDateTime`, and the reverse type mapping emits `DATETIMEOFFSET`, addressing the loss of offset semantics reported here.
   
   Resolution evidence:
   
   - [PR #10724](https://github.com/apache/seatunnel/pull/10724), merged into `dev` on 2026-06-29 ([merge commit `872077f6480a`](https://github.com/apache/seatunnel/commit/872077f6480ade460efca5501a3847fa2703e681)).
   
   The corresponding implementation remains present in [`dev` at `14a27ac26a0a`](https://github.com/apache/seatunnel/commit/14a27ac26a0a71b56722f86cdf8ec2779094ceaf).
   
   <!-- seatunnel-closure-audit:20261023:10440 -->


-- 
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: [I] [Bug] [connector-jdbc-sqlserver] SQLServer datetimeoffset should be mapped to OffsetDateTime instead of LocalDateTime [seatunnel]

Posted by "DanielCarter-stack (via GitHub)" <gi...@apache.org>.
DanielCarter-stack commented on issue #10440:
URL: https://github.com/apache/seatunnel/issues/10440#issuecomment-3839984156

   <!-- code-pr-reviewer -->
   Thanks for reporting this bug. The analysis confirms that `DATETIMEOFFSET` is incorrectly mapped to `LOCAL_DATE_TIME_TYPE` and should be `OFFSET_DATE_TIME_TYPE` to preserve timezone information.
   
   Key findings:
   - `SqlServerTypeConverter.java:295` currently maps `DATETIMEOFFSET` to `LOCAL_DATE_TIME_TYPE` (SqlType.TIMESTAMP)
   - `PostgresTypeConverter.java:278` correctly maps `timestamptz` to `OFFSET_DATE_TIME_TYPE` as a reference
   - `SqlServerTypeConverterTest.java:543` also needs the corresponding assertion update
   - `LocalTimeType.OFFSET_DATE_TIME_TYPE` (SqlType.TIMESTAMP_TZ) is available in the API
   
   Suggested fix scope:
   1. Change `SqlServerTypeConverter.java:295` to use `OFFSET_DATE_TIME_TYPE`
   2. Update the test assertion in `SqlServerTypeConverterTest.java:543`
   3. Verify `reconvert()` method handles `TIMESTAMP_TZ` / `OffsetDateTime` correctly
   
   A PR to fix this would be welcome.


-- 
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: [I] [Bug] [connector-jdbc-sqlserver] SQLServer datetimeoffset should be mapped to OffsetDateTime instead of LocalDateTime [seatunnel]

Posted by "yzeng1618 (via GitHub)" <gi...@apache.org>.
yzeng1618 commented on issue #10440:
URL: https://github.com/apache/seatunnel/issues/10440#issuecomment-3840132646

   https://github.com/apache/seatunnel/pull/10029, The PR I submitted already includes the fix for this part. Once the PR is merged, this requirement should be met.
   <img width="1996" height="1072" alt="Image" src="https://github.com/user-attachments/assets/7acd6a92-01c8-41d5-912e-b71e94e4715a" />


-- 
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: [I] [Bug] [connector-jdbc-sqlserver] SQLServer datetimeoffset should be mapped to OffsetDateTime instead of LocalDateTime [seatunnel]

Posted by "yzeng1618 (via GitHub)" <gi...@apache.org>.
yzeng1618 commented on issue #10440:
URL: https://github.com/apache/seatunnel/issues/10440#issuecomment-3840384614

   I'm not quite sure about this for now – feel free to raise a separate PR to fix it on your side.


-- 
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: [I] [Bug] [connector-jdbc-sqlserver] SQLServer datetimeoffset should be mapped to OffsetDateTime instead of LocalDateTime [seatunnel]

Posted by "MukjepScarlet (via GitHub)" <gi...@apache.org>.
MukjepScarlet commented on issue #10440:
URL: https://github.com/apache/seatunnel/issues/10440#issuecomment-3840341097

   Will https://github.com/apache/seatunnel/pull/10029 be merged soon? If not, I can add a standalone PR for this.


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