You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2021/01/14 14:25:46 UTC

[GitHub] [flink] wuchong commented on a change in pull request #14652: [FLINK-20953][canal][json] Option 'canal-json.database.include' and 'canal-json.table.include' support regular expression

wuchong commented on a change in pull request #14652:
URL: https://github.com/apache/flink/pull/14652#discussion_r557431574



##########
File path: flink-formats/flink-json/src/main/java/org/apache/flink/formats/json/canal/CanalJsonDeserializationSchema.java
##########
@@ -197,12 +198,12 @@ public void deserialize(@Nullable byte[] message, Collector<RowData> out) throws
         try {
             final JsonNode root = jsonDeserializer.deserializeToJsonNode(message);
             if (database != null) {
-                if (!database.equals(root.get(ReadableMetadata.DATABASE.key).asText())) {
+                if (!Pattern.matches(database, root.get(ReadableMetadata.DATABASE.key).asText())) {

Review comment:
       We should reuse the pattern. 




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

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