Jiabao-Sun commented on code in PR #17: URL: https://github.com/apache/flink-connector-mongodb/pull/17#discussion_r1374448348
########## flink-connector-mongodb/src/main/java/org/apache/flink/connector/mongodb/table/MongoDynamicTableSource.java: ########## @@ -148,13 +163,16 @@ public ChangelogMode getChangelogMode() { @Override public DynamicTableSource copy() { - return new MongoDynamicTableSource( - connectionOptions, - readOptions, - lookupCache, - lookupMaxRetries, - lookupRetryIntervalMs, - producedDataType); + MongoDynamicTableSource newSource = + new MongoDynamicTableSource( + connectionOptions, + readOptions, + lookupCache, + lookupMaxRetries, + lookupRetryIntervalMs, + producedDataType); + newSource.filter = BsonDocument.parse(filter.toJson()); Review Comment: As the java doc of the copy method, the copy should be a deep copy of all. ```java /** * Creates a copy of this instance during planning. The copy should be a deep copy of all * mutable members. */ DynamicTableSource copy(); ``` -- 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-unsubscr...@flink.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org