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

[PR] [cdc] Fix the null pointer exception in obtaining metadata column op_ts value in mysql cdc action. [incubator-paimon]

zhuangchong opened a new pull request, #2234:
URL: https://github.com/apache/incubator-paimon/pull/2234

   
   
   <!-- Please specify the module before the PR name: [core] ... or [flink] ... -->
   
   ### Purpose
   
   <!-- Linking this pull request to the issue -->
   Linked issue: close #2182 
   
   Fix the null pointer exception in obtaining metadata column `op_ts` value in mysql cdc action.
   
   Fix NPE in obtaining metadata column `op_ts` value in mysql cdc action
   
   <!-- What is the purpose of the change -->
   
   ### Tests
   
   <!-- List UT and IT cases to verify this change -->
   
   ### API and Format
   
   <!-- Does this change affect API or storage format -->
   
   ### Documentation
   
   <!-- Does this change introduce a new feature -->
   


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


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

Posted by "zhuangchong (via GitHub)" <gi...@apache.org>.
zhuangchong commented on code in PR #2234:
URL: https://github.com/apache/incubator-paimon/pull/2234#discussion_r1393640602


##########
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:
   This is it, comments have been 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: issues-unsubscribe@paimon.apache.org

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


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

Posted by "yuzelin (via GitHub)" <gi...@apache.org>.
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


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

Posted by "yuzelin (via GitHub)" <gi...@apache.org>.
yuzelin merged PR #2234:
URL: https://github.com/apache/incubator-paimon/pull/2234


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