Github user gatorsmile commented on the issue: https://github.com/apache/spark/pull/16938 Based on [the doc](https://cwiki.apache.org/confluence/display/Hive/LanguageManual+DDL#LanguageManualDDL-CreateTableAsSelect(CTAS)), Hive does not support CTAS when the target table is external. **1. CREATE TABLE ... LOCATION path** **2. CREATE TABLE ... LOCATION path AS SELECT ...** When you testing the above two cases, you need to change the syntax a little bit by manually adding `EXTERNAL`. Spark SQL actually is creating an external table. This is different from Hive. **1. CREATE EXTERNAL TABLE ... LOCATION path** **2. CREATE EXTERNAL TABLE ... LOCATION path AS SELECT ...** Could you update the comparison? Thanks!
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org