sujith71955 opened a new pull request #24558: [SPARK-27617][SQL] Support creating managed table on user specified location URL: https://github.com/apache/spark/pull/24558 ## What changes were proposed in this pull request? ``` CREATE TABLE IF NOT EXISTS ext2 (name STRING) LOCATION 'D:/spark-2.4.1-bin-hadoop2.7/bin/spark-warehouse/abc_orc13'""") CREATE EXTERNAL TABLE IF NOT EXISTS ext2 (name STRING) LOCATION 'D:/spark-2.4.1-bin-hadoop2.7/bin/spark-warehouse/abc_orc13'""") ``` Both commands creates an external table here , Where as in impala and hive behaves differently If 'EXTERNAL' keyword is been used in CREATE command, only then the table will be considered as external, else it will be managed. this behavior is making below mentioned use-cases getting blocked. usecase 1: user will not able to set an external location for a managed table. usecase 2: compatibility issue with hive/impala which also cause problems in job migrations to spark. The changes here i am proposing is when user creates table without 'External' keyword like below CREATE TABLE IF NOT EXISTS ext2 (name STRING) LOCATION 'D:/spark-2.4.1-bin-hadoop2.7/bin/spark-warehouse/abc_orc13'""") spark shall create a managed table which can refer any location specified by user and able to delete the metadata/data of user on drop table command similar to hive and impala system . ## How was this patch tested? UT and also tested manually.
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
