lincoln-lil commented on code in PR #22894:
URL: https://github.com/apache/flink/pull/22894#discussion_r1253912150


##########
flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/connectors/DynamicSourceUtils.java:
##########
@@ -483,8 +483,11 @@ private static void validateScanSourceForStreaming(
             ChangelogMode changelogMode,
             ReadableConfig config) {
         // sanity check for produced ChangelogMode
-        final boolean hasUpdateBefore = 
changelogMode.contains(RowKind.UPDATE_BEFORE);
-        final boolean hasUpdateAfter = 
changelogMode.contains(RowKind.UPDATE_AFTER);
+        final boolean hasChangelogMode = changelogMode != null;

Review Comment:
   because the mocked table (`TestDynamicTableFactory.DynamicTableSourceMock`) 
used in test case `DynamicTableSourceSpecSerdeTest` returns null changelog 
mode(may also be the case in user implemented connectors), so the protection 
was 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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to