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

Support `ALTER TABLE table_name ADD COLUMNS(..)` for ORC data source

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.2.0
    • Fix Version/s: 2.3.0
    • Component/s: SQL
    • Labels:
      None

      Description

      SPARK-19261 implemented `ADD COLUMNS` at Spark 2.2, but ORC data source is not supported due to its limit.

      scala> sql("CREATE TABLE tab (c1 int, c2 int, c3 int) USING ORC PARTITIONED BY (c3)")
      scala> sql("ALTER TABLE tab ADD COLUMNS (c4 int)")
      org.apache.spark.sql.AnalysisException:
      ALTER ADD COLUMNS does not support datasource table with type ORC.
      You must drop and re-create the table for adding the new columns. Tables: `tab`;
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                dongjoon Dongjoon Hyun
                Reporter:
                dongjoon Dongjoon Hyun
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: