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

    https://github.com/apache/spark/pull/12303#discussion_r59250894
  
    --- Diff: 
sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/SQLQuerySuite.scala 
---
    @@ -1852,4 +1852,31 @@ class SQLQuerySuite extends QueryTest with 
SQLTestUtils with TestHiveSingleton {
           }
         }
       }
    +
    +  test(
    +    "SPARK-14488 \"CREATE TEMPORARY TABLE ... USING ... AS SELECT ...\" " +
    +    "shouldn't create persisted table"
    +  ) {
    +    withTempPath { dir =>
    +      withTempTable("t1", "t2") {
    +        val path = dir.getCanonicalPath
    +        val ds = sqlContext.range(10)
    +        ds.registerTempTable("t1")
    +
    +        sql(
    +          s"""CREATE TEMPORARY TABLE t2
    +             |USING PARQUET
    +             |OPTIONS (PATH '$path')
    +             |AS SELECT * FROM t1
    --- End diff --
    
    I think this will actually save the data. How about we just support `CREATE 
TEMPORARY TABLE t2 AS SELECT ...`, which is equivalent with 
`sqlContext.sql(...).registerTempTable`?
    
    Then, we can support INSERT INTO a location in the file system.


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