[
https://issues.apache.org/jira/browse/FLINK-32587?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17750208#comment-17750208
]
jasonliangyc edited comment on FLINK-32587 at 8/2/23 9:28 AM:
--------------------------------------------------------------
Hi [~jiabao.sun] , thanks for your advices and after serveral tests with the
new version file: flink-sql-connector-sqlserver-cdc-2.4.1.jar, now i only found
one issue still exist, that is the NULL still returned.
the Create_Date and Last_Update_Date have the same datatype.
sqlserver DDL
!image-2023-08-02-17-25-36-207.png!
flink sql DDL
!image-2023-08-02-17-26-08-692.png|width=416,height=141!
!image-2023-08-02-17-09-14-671.png|width=556,height=151!
!image-2023-08-02-17-18-06-375.png|width=549,height=268!
was (Author: JIRAUSER301313):
Hi [~jiabao.sun] , thanks for your advices and after serveral tests with the
new version file: flink-sql-connector-sqlserver-cdc-2.4.1.jar, now i only found
one issue still exist, that is the NULL still returned.
!image-2023-08-02-17-09-14-671.png|width=556,height=151!
!image-2023-08-02-17-18-06-375.png|width=549,height=268!
> The results returned from the CDC sql query are null or the value was changed
> unexpectly
> ----------------------------------------------------------------------------------------
>
> Key: FLINK-32587
> URL: https://issues.apache.org/jira/browse/FLINK-32587
> Project: Flink
> Issue Type: Bug
> Components: Table SQL / Client
> Affects Versions: 1.17.0, 1.17.1
> Reporter: jasonliangyc
> Priority: Critical
> Attachments: image-2023-07-13-17-35-32-235.png,
> image-2023-07-13-17-37-56-908.png, image-2023-07-21-14-48-31-572.png,
> image-2023-08-02-16-40-32-476.png, image-2023-08-02-16-43-25-458.png,
> image-2023-08-02-17-03-05-932.png, image-2023-08-02-17-07-19-295.png,
> image-2023-08-02-17-09-14-671.png, image-2023-08-02-17-10-03-889.png,
> image-2023-08-02-17-18-06-375.png, image-2023-08-02-17-25-36-207.png,
> image-2023-08-02-17-26-08-692.png
>
>
> I created a CDC table(the sqlserver source table has more than 100 columns)
> as below and then run the query 'select * from so_cdc' through sql-client, it
> gives me the unexpected results.
> {code:java}
> CREATE TABLE so_cdc (
> REC_ID STRING,
> Create_Date TIMESTAMP(3),
> PRIMARY KEY (REC_ID) NOT ENFORCED
> ) WITH (
> 'connector' = 'sqlserver-cdc',
> 'hostname' = 'xxxx',
> 'port' = 'xxxx',
> 'username' = 'xxx',
> 'password' = 'xxxx',
> 'database-name' = 'xxxx',
> 'schema-name' = 'xxxx',
> 'table-name' = 'xxx',
> 'scan.startup.mode' = 'latest-offset'
> ); {code}
> Run the query for the first time, the data look normal.
> !image-2023-07-13-17-35-32-235.png|width=535,height=141!
>
> But after i run the same query multiple times, it gives me the unexpected
> data, and i'm sure that these two columns of my sqlserver source table don't
> contain these data.
> And i found that the values of 'REC_ID' were actually the values of another
> column in the sqlserver source table, it seems the query returned the wrong
> columns.
> Above sqlserver source table is in the production database and i can't
> reproduce the same issue in dev db.
> !image-2023-07-21-14-48-31-572.png|width=533,height=159!
--
This message was sent by Atlassian Jira
(v8.20.10#820010)