Github user liancheng commented on a diff in the pull request:

    https://github.com/apache/spark/pull/13270#discussion_r64503026
  
    --- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/execution/command/createDataSourceTables.scala
 ---
    @@ -385,7 +385,10 @@ object CreateDataSourceTableUtils extends Logging {
             schema = relation.schema.map { f =>
               CatalogColumn(f.name, f.dataType.catalogString)
             },
    -        properties = tableProperties.toMap,
    +        // Removes the provider property since we are gonna saving this 
table as a Hive compatible
    +        // one, and other places use this property to check whether a 
table is a data source table
    +        // (e.g. `DDLUtils.isDatasourceTable`).
    +        properties = (tableProperties - 
"spark.sql.sources.provider").toMap,
    --- End diff --
    
    Unfortunately this doesn't work, because we still want to recognize this 
table as data source table when saving data into the table using 
`CreateDataSourceTableAsSelectCommand`. My [last commit][1] tries to fix this 
by checking `.storage.locationUri.isEmpty`. This should work because data 
source tables never set this field.
    
    
https://github.com/apache/spark/pull/13270/commits/193e0059be83006ddcce30a56c2b6ae09a2cac31


---
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 [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to