spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gatorsmile <...@git.apache.org>
Subject [GitHub] spark pull request #14410: [SPARK-16803] [SQL] SaveAsTable does not work whe...
Date Sat, 30 Jul 2016 03:01:50 GMT
Github user gatorsmile commented on a diff in the pull request:

    https://github.com/apache/spark/pull/14410#discussion_r72880810
  
    --- Diff: sql/core/src/main/scala/org/apache/spark/sql/execution/command/createDataSourceTables.scala
---
    @@ -236,6 +236,11 @@ case class CreateDataSourceTableAsSelectCommand(
                   existingSchema = Some(l.schema)
                 case s: SimpleCatalogRelation if DDLUtils.isDatasourceTable(s.metadata) =>
                   existingSchema = Some(DDLUtils.getSchemaFromTableProperties(s.metadata))
    +            // When the source table is a Hive table, the `saveAsTable` API of DataFrameWriter
    +            // does not work. Instead, use the `insertInto` API.
    +            case o if o.getClass.getName == "org.apache.spark.sql.hive.MetastoreRelation"
=>
    --- End diff --
    
    Agree! Do you have any idea how to improve it? 
    
    ```
    org.apache.spark.sql.AnalysisException: Saving data in MetastoreRelation sample, sample
     is not supported.;
    ```


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Mime
View raw message