sujith71955 commented on a change in pull request #24558: [SPARK-27617][SQL] 
Support creating managed table on user specified location
URL: https://github.com/apache/spark/pull/24558#discussion_r282458727
 
 

 ##########
 File path: 
sql/core/src/main/scala/org/apache/spark/sql/execution/SparkSqlParser.scala
 ##########
 @@ -988,9 +988,10 @@ class SparkSqlAstBuilder(conf: SQLConf) extends 
AstBuilder(conf) {
       serde = 
rowStorage.serde.orElse(fileStorage.serde).orElse(defaultStorage.serde),
       compressed = false,
       properties = rowStorage.properties ++ fileStorage.properties)
-    // If location is defined, we'll assume this is an external table.
-    // Otherwise, we may accidentally delete existing data.
-    val tableType = if (external || location.isDefined) {
+    // If external is defined, we'll assume this is an external table.
+    // Otherwise, we may consider it as managed table where the data
+    // will be deleted on drop table command.
+    val tableType = if (external) {
 
 Review comment:
   Even i am not able to figure out any work around to manage this scenario, 
except i can advice them to manually go and delete the data .

----------------------------------------------------------------
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]

Reply via email to