You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "lichenglin (JIRA)" <ji...@apache.org> on 2016/12/16 01:57:58 UTC

[jira] [Commented] (SPARK-14130) [Table related commands] Alter column

    [ https://issues.apache.org/jira/browse/SPARK-14130?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15753148#comment-15753148 ] 

lichenglin commented on SPARK-14130:
------------------------------------

"TOK_ALTERTABLE_ADDCOLS" is a very important command for data warehouse.

Does spark have any plan to support  for it??



> [Table related commands] Alter column
> -------------------------------------
>
>                 Key: SPARK-14130
>                 URL: https://issues.apache.org/jira/browse/SPARK-14130
>             Project: Spark
>          Issue Type: Sub-task
>          Components: SQL
>            Reporter: Yin Huai
>            Assignee: Yin Huai
>             Fix For: 2.0.0
>
>
> For alter column command, we have the following tokens.
> TOK_ALTERTABLE_RENAMECOL
> TOK_ALTERTABLE_ADDCOLS
> TOK_ALTERTABLE_REPLACECOLS
> For data source tables, we should throw exceptions. For Hive tables, we should support them. *For Hive tables, we should check Hive's behavior to see if there is any file format that does not any of above command*. https://github.com/apache/hive/blob/master/ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java is a good reference for Hive's behavior. 
> Also, for a Hive table stored in a format, we need to make sure that even if Spark can read this tables after an alter column operation. If we cannot read the table, even Hive allows the alter column operation, we should still throw an exception. For example, if renaming a column of a Hive parquet table causes the renamed column inaccessible (we cannot read values), we should not allow this renaming operation.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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