You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Dongjoon Hyun (JIRA)" <ji...@apache.org> on 2017/10/11 00:08:00 UTC

[jira] [Updated] (SPARK-21929) Support `ALTER TABLE table_name ADD COLUMNS(..)` for ORC data source

     [ https://issues.apache.org/jira/browse/SPARK-21929?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dongjoon Hyun updated SPARK-21929:
----------------------------------
    Description: 
SPARK-19261 implemented `ADD COLUMNS` at Spark 2.2, but ORC data source is not supported due to its limit.

{code}
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`;
{code}

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


> Support `ALTER TABLE table_name ADD COLUMNS(..)` for ORC data source
> --------------------------------------------------------------------
>
>                 Key: SPARK-21929
>                 URL: https://issues.apache.org/jira/browse/SPARK-21929
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 2.2.0
>            Reporter: Dongjoon Hyun
>
> SPARK-19261 implemented `ADD COLUMNS` at Spark 2.2, but ORC data source is not supported due to its limit.
> {code}
> 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`;
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org