yikf opened a new pull request #32589:
URL: https://github.com/apache/spark/pull/32589


   ### What changes were proposed in this pull request?
   We should `return` directly if table already exist and ignoreIfExists=`true`
   
   Current logic:
   ```
   requireDbExists(db)
       if (tableExists(newTableDefinition.identifier)) {
         if (!ignoreIfExists) {
           throw new TableAlreadyExistsException(db = db, table = table)
         }
       } else if (validateLocation) {
         validateTableLocation(newTableDefinition)
       }
       externalCatalog.createTable(newTableDefinition, ignoreIfExists)
   ```
   
   ### Why are the changes needed?
   this is a improve
   
   ### Does this PR introduce _any_ user-facing change?
   No
   
   
   ### How was this patch tested?
   exists now
   


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

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to