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

    https://github.com/apache/spark/pull/14482#discussion_r73574347
  
    --- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/internal/CatalogImpl.scala ---
    @@ -272,18 +259,15 @@ class CatalogImpl(sparkSession: SparkSession) extends 
Catalog {
           schema: StructType,
           options: Map[String, String]): DataFrame = {
         val tableIdent = 
sparkSession.sessionState.sqlParser.parseTableIdentifier(tableName)
    -    val cmd =
    -      CreateTableUsing(
    -        tableIdent,
    -        userSpecifiedSchema = Some(schema),
    -        source,
    -        temporary = false,
    -        options,
    -        partitionColumns = Array.empty[String],
    -        bucketSpec = None,
    -        allowExisting = false,
    -        managedIfNoPath = false)
    -    sparkSession.sessionState.executePlan(cmd).toRdd
    +    val tableDesc = CatalogTable(
    +      identifier = tableIdent,
    +      tableType = CatalogTableType.EXTERNAL,
    +      storage = CatalogStorageFormat.empty.copy(properties = options),
    +      schema = schema,
    +      provider = Some(source)
    +    )
    +    val plan = CreateTable(tableDesc, SaveMode.ErrorIfExists, None)
    --- End diff --
    
    If so, we need to populate the `location` of `storage`. Maybe we just 
disable the option `hive` and issue an exception when users do it?


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

Reply via email to