You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@paimon.apache.org by "yuzelin (via GitHub)" <gi...@apache.org> on 2023/11/15 02:26:49 UTC

Re: [PR] [cdc] Fix NPE in obtaining metadata column op_ts value in mysql cdc action. [incubator-paimon]

yuzelin commented on code in PR #2234:
URL: https://github.com/apache/incubator-paimon/pull/2234#discussion_r1393557084


##########
paimon-flink/paimon-flink-cdc/src/test/java/org/apache/paimon/flink/action/cdc/mysql/MySqlSyncTableActionITCase.java:
##########
@@ -922,13 +922,14 @@ public void testMetadataColumns() throws Exception {
                             DataTypes.INT().notNull(),
                             DataTypes.VARCHAR(10),
                             DataTypes.STRING().notNull(),
-                            DataTypes.STRING().notNull()
+                            DataTypes.STRING().notNull(),
+                            DataTypes.TIMESTAMP_WITH_LOCAL_TIME_ZONE(3).notNull()
                         },
-                        new String[] {"pk", "_date", "table_name", "database_name"});
+                        new String[] {"pk", "_date", "table_name", "database_name", "op_ts"});
         waitForResult(
                 Arrays.asList(
-                        "+I[1, 2023-07-30, test_metadata_columns, metadata]",
-                        "+I[2, 2023-07-30, test_metadata_columns, metadata]"),
+                        "+I[1, 2023-07-30, test_metadata_columns, metadata, 1970-01-01T00:00]",
+                        "+I[2, 2023-07-30, test_metadata_columns, metadata, 1970-01-01T00:00]"),

Review Comment:
   `op_ts` is always '0' when reading from snapshot so the test result is `1970-01-01T00:00`. Am I right? If so, please add comment to explain it (and you can add this [link](https://ververica.github.io/flink-cdc-connectors/master/content/connectors/mysql-cdc.html#available-metadata))



-- 
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: issues-unsubscribe@paimon.apache.org

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