[ 
https://issues.apache.org/jira/browse/SPARK-35444?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

yikf updated SPARK-35444:
-------------------------
    Description: 
It should return directly if table exists and ignoreIfExists=true

 

current logic:
{code:java}
requireDbExists(db)
if (tableExists(newTableDefinition.identifier)) {
  if (!ignoreIfExists) {
    throw new TableAlreadyExistsException(db = db, table = table)
  }
} else if (validateLocation) {
  validateTableLocation(newTableDefinition)
}
externalCatalog.createTable(newTableDefinition, ignoreIfExists)
{code}

  was:It should return directly if table exists and ignoreIfExists=true


> Improve createTable logic if table exists
> -----------------------------------------
>
>                 Key: SPARK-35444
>                 URL: https://issues.apache.org/jira/browse/SPARK-35444
>             Project: Spark
>          Issue Type: Improvement
>          Components: SQL
>    Affects Versions: 3.0.0
>            Reporter: yikf
>            Priority: Major
>             Fix For: 3.0.0
>
>
> It should return directly if table exists and ignoreIfExists=true
>  
> current logic:
> {code:java}
> requireDbExists(db)
> if (tableExists(newTableDefinition.identifier)) {
>   if (!ignoreIfExists) {
>     throw new TableAlreadyExistsException(db = db, table = table)
>   }
> } else if (validateLocation) {
>   validateTableLocation(newTableDefinition)
> }
> externalCatalog.createTable(newTableDefinition, ignoreIfExists)
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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

Reply via email to