singhpk234 commented on code in PR #1371:
URL: https://github.com/apache/polaris/pull/1371#discussion_r2060476108


##########
extension/persistence/relational-jdbc/src/main/java/org/apache/polaris/extension/persistence/relational/jdbc/JdbcBasePersistenceImpl.java:
##########
@@ -158,17 +167,25 @@ public void writeEntities(
                       entity.getParentId(),
                       entity.getTypeCode(),
                       entity.getName());
-              if (exists != null) {
+              if (exists != null && !isUpdate) {
                 throw new EntityAlreadyExistsException(entity);
               }
               String query;
-              if (originalEntities == null || originalEntities.get(i) == null) 
{
+              if (!isUpdate) {

Review Comment:
   The thing is we need (statement) which corresponds to the same connection in 
which the transaction was started, so sharing of code between the two methods 
even though they are identical is bit blurred, let me see if i can pass in a 
lambda to call from these to encorporate that. 



-- 
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...@polaris.apache.org

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

Reply via email to