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

Hyukjin Kwon commented on SPARK-26388:
--------------------------------------

Can you add expected input / output in the description? that should be easier 
to follow.

> No support for "alter table .. replace columns" to drop columns
> ---------------------------------------------------------------
>
>                 Key: SPARK-26388
>                 URL: https://issues.apache.org/jira/browse/SPARK-26388
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 2.2.1, 2.3.1, 2.3.2
>            Reporter: nirav patel
>            Priority: Major
>
> Looks like hive {{replace columns}} is not working with spark 2.2.1 and 2.3.1
>  
> {{alterSchemaSql : alter table myschema.mytable replace columns (a int,b 
> int,d int) Exception in thread "main" 
> org.apache.spark.sql.catalyst.parser.ParseException: Operation not allowed: 
> alter table replace columns(line 2, pos 6) }}
> {{ADD COLUMNS}} works which seemed to previously reported and fixed as well:
> https://issues.apache.org/jira/browse/SPARK-18893
>  
> Replace columns should be supported as well. afaik, that's the only way to 
> delete hive columns.
>  
>  
> It supposed to work according to this docs:
> [https://docs.databricks.com/spark/latest/spark-sql/language-manual/alter-table-or-view.html#replace-columns]
> [https://spark.apache.org/docs/2.2.0/sql-programming-guide.html#supported-hive-features]
>  
> but it's throwing error for me on 2 different versions.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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

Reply via email to