Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FLINK-35056] Fix conversion of SQL Server TIMESTAMP to Flink #3561

Merged
merged 1 commit into from
Aug 22, 2024

Conversation

morozov
Copy link
Contributor

@morozov morozov commented Aug 21, 2024

When introspecting a TIMESTAMP column from SQL Server, the connector should use the scale (in Debezium schema terms) as the value for the Flink TIMESTAMP precision, not length.

Otherwise, the connector attempts to convert datetime SQL Server type, which Debezium introspects as datetime(23, 3), to Flink's TIMESTAMP(23) and fails:

org.apache.flink.table.api.ValidationException: Timestamp precision must be between 0 and 9 (both inclusive).

Copy link
Contributor

@leonardBang leonardBang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @morozov for the fix, LGTM

@leonardBang leonardBang merged commit 52f2019 into apache:master Aug 22, 2024
21 checks passed
@leonardBang
Copy link
Contributor

@morozov Would you like to open a PR to backport the fix to release-3.2 branch?

yuxiqian pushed a commit to yuxiqian/flink-cdc that referenced this pull request Aug 23, 2024
…ver TIMESTAMP to Flink SQL timestamp

This closes apache#3561.

(cherry picked from commit 52f2019)
@morozov morozov deleted the FLINK-35056 branch August 26, 2024 16:24
leonardBang pushed a commit to yuxiqian/flink-cdc that referenced this pull request Aug 27, 2024
…ver TIMESTAMP to Flink SQL timestamp

This closes apache#3561.

(cherry picked from commit 52f2019)
leonardBang pushed a commit that referenced this pull request Aug 27, 2024
…ver TIMESTAMP to Flink SQL timestamp

This closes #3561.

(cherry picked from commit 52f2019)
qiaozongmi pushed a commit to qiaozongmi/flink-cdc that referenced this pull request Sep 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants