yaooqinn commented on a change in pull request #28231: [SPARK-31458][SQL] LOAD 
DATA support for builtin datasource tables
URL: https://github.com/apache/spark/pull/28231#discussion_r410025117
 
 

 ##########
 File path: 
sql/core/src/main/scala/org/apache/spark/sql/execution/command/tables.scala
 ##########
 @@ -313,9 +313,11 @@ case class LoadDataCommand(
     if (targetTable.tableType == CatalogTableType.VIEW) {
       throw new AnalysisException(s"Target table in LOAD DATA cannot be a 
view: $tableIdentwithDB")
     }
-    if (DDLUtils.isDatasourceTable(targetTable)) {
-      throw new AnalysisException(
-        s"LOAD DATA is not supported for datasource tables: $tableIdentwithDB")
+
+    if (targetTable.provider.isDefined && !DDLUtils.isHiveTable(targetTable) &&
+      HiveSerDe.sourceToSerDe(targetTable.provider.get).isEmpty) {
 
 Review comment:
   Or a seq-config with spark built-in datasources as default value?

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