hawk9821 commented on code in PR #10367:
URL: https://github.com/apache/seatunnel/pull/10367#discussion_r2745042352
##########
seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/internal/dialect/JdbcDialect.java:
##########
@@ -238,7 +238,7 @@ default String getRowExistsStatement(
* @return the dialects {@code UPSERT} statement or {@link
Optional#empty()}.
*/
Optional<String> getUpsertStatement(
- String database, String tableName, String[] fieldNames, String[]
uniqueKeyFields);
+ String database, String tableName, String[] fieldNames, String[]
pkNames);
Review Comment:
A critical issue with renaming uniqueKeyFields to pkNames:
1. PK and Unique Key are distinct database constraints (non-null vs
nullable, single vs multiple) — the rename causes semantic ambiguity.
2. Most databases disallow updating Unique Key columns in upsert logic. This
rename breaks the parameter-logic alignment and risks runtime DB errors.
--
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]