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`;
SPARK-20901 Feature parity for ORC with Parquet
- relates to
SPARK-19261 Support `ALTER TABLE table_name ADD COLUMNS(..)` statement
- links to