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

Relax ordering constraint for ALTER TABLE ADD|REPLACE column options

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.5.0
    • 3.5.0
    • SQL
    • None

    Description

      Currently the grammar for ALTER TABLE ADD|REPLACE column is:

      qualifiedColTypeWithPosition
      : name=multipartIdentifier dataType (NOT NULL)? defaultExpression? commentSpec? colPosition?
      ;

      This enforces a constraint on the order of: (NOT NULL, DEFAULT value, COMMENT value FIRST|AFTER value). We can update the grammar to allow these options in any order instead, to improve usability.

      Attachments

        Activity

          People

            vli-databricks Vitalii Li
            vli-databricks Vitalii Li
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: