You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Lantao Jin (Jira)" <ji...@apache.org> on 2019/10/12 08:45:00 UTC

[jira] [Commented] (SPARK-29441) Unable to Alter table column type in spark.

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

Lantao Jin commented on SPARK-29441:
------------------------------------

ALTER TABLE CHANGE COLUMN command only supports changing the comment of a non-partition column for now.

> Unable to Alter table column type in spark.
> -------------------------------------------
>
>                 Key: SPARK-29441
>                 URL: https://issues.apache.org/jira/browse/SPARK-29441
>             Project: Spark
>          Issue Type: Bug
>          Components: Spark Shell
>    Affects Versions: 2.3.1
>         Environment: spark -2.3
> hadoop -2.4
>            Reporter: prudhviraj
>            Priority: Major
>
> Unable to alter table column type in spark.
> scala> spark.sql("""alter table tablename change col1 col1 string""")
> org.apache.spark.sql.AnalysisException: ALTER TABLE CHANGE COLUMN is not supported for changing column 'col1' with type 'LongType' to 'col1' with type 'StringType';



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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