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

Improve createTable logic if table exists

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: In Progress
    • Major
    • Resolution: Unresolved
    • 3.0.0
    • 3.0.0
    • SQL
    • 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

            Unassigned Unassigned
            kaifeiYi Yi kaifei
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: