nirav patel created SPARK-26388: ----------------------------------- Summary: 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.3.1, 2.2.1 Reporter: nirav patel
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