snicholasbarton commented on code in PR #4554:
URL: https://github.com/apache/polaris/pull/4554#discussion_r3330611395


##########
persistence/relational-jdbc/src/main/java/org/apache/polaris/persistence/relational/jdbc/JdbcBasePersistenceImpl.java:
##########
@@ -265,13 +258,17 @@ public void writeToGrantRecords(
           QueryGenerator.generateInsertQuery(
               ModelGrantRecord.ALL_COLUMNS, ModelGrantRecord.TABLE_NAME, 
values, realmId));
     } catch (SQLException e) {
+      if (datasourceOperations.isConstraintViolation(e)) {

Review Comment:
   I'm not opposed in theory; if non-PK fields are added later then we probably 
do want this. Chose not to here for consistency (didn't see any existing direct 
upsert query patterns), portability (I think the query might be different per 
PG/Cockroach/H2), and YAGNI (all the fields are part of the PK, so currently we 
don't actually have anything to update). Happy to revisit if you think it's 
worth it



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