Hi all, I am using spark 2.0 and would like execute the command below to drop the partition with PURGE.
sql = "ALTER TABLE db.table1 DROP IF EXISTS PARTITION (pkey='150') PURGE" spark.sql(sql) It throws exception: /Py4JJavaError: An error occurred while calling o45.sql. : org.apache.spark.sql.catalyst.parser.ParseException: Operation not allowed: ALTER TABLE ... DROP PARTITION ... PURGE(line 1, pos 0) == SQL == ALTER TABLE exp_project_1463.ds_item1 DROP IF EXISTS PARTITION (pkey='150') PURGE ^^^/ Without PURGE, I can execute successfully. Any idea what is going wrong? Thank you. -- View this message in context: http://apache-spark-user-list.1001560.n3.nabble.com/Drop-partition-with-PURGE-fail-tp27936.html Sent from the Apache Spark User List mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe e-mail: user-unsubscr...@spark.apache.org