You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Apache Spark (Jira)" <ji...@apache.org> on 2021/05/19 12:09:00 UTC
[jira] [Assigned] (SPARK-35444) Improve createTable logic if table
exists
[ https://issues.apache.org/jira/browse/SPARK-35444?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Apache Spark reassigned SPARK-35444:
------------------------------------
Assignee: Apache Spark
> 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
> Assignee: Apache Spark
> 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: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org