Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-35444

Improve createTable logic if table exists

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: In Progress
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 3.0.0
    • Fix Version/s: 3.0.0
    • Component/s: SQL
    • Labels:
      None

      Description

      It should return directly if table exists 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)
      

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              kaifeiYi yikf
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: