leonardBang commented on code in PR #155: URL: https://github.com/apache/flink-connector-jdbc/pull/155#discussion_r1944150943
########## flink-connector-jdbc-postgres/src/main/java/org/apache/flink/connector/jdbc/postgres/database/dialect/PostgresDialect.java: ########## @@ -73,8 +74,10 @@ public Optional<String> getUpsertStatement( Arrays.stream(uniqueKeyFields) .map(this::quoteIdentifier) .collect(Collectors.joining(", ")); + final Set<String> uniqueKeyFieldsSet = new HashSet<>(Arrays.asList(uniqueKeyFields)); String updateClause = Arrays.stream(fieldNames) + .filter(f -> !uniqueKeyFieldsSet.contains(f)) Review Comment: This change makes sense to me after read Postgresql `ON CONFLICT ... DO UPDATE SET..` SQL grammar, could you add a unit test for this change ? -- 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