spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From liancheng <...@git.apache.org>
Subject [GitHub] spark pull request: [SPARK-6339][SQL] Supports create CREATE TEMPO...
Date Wed, 04 May 2016 09:54:25 GMT
Github user liancheng commented on a diff in the pull request:

    https://github.com/apache/spark/pull/12872#discussion_r62014991
  
    --- Diff: sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/SQLViewSuite.scala
---
    @@ -37,11 +37,21 @@ class SQLViewSuite extends QueryTest with SQLTestUtils with TestHiveSingleton
{
         sqlContext.sql(s"DROP TABLE IF EXISTS jt")
       }
     
    -  test("nested views") {
    -    withView("jtv1", "jtv2") {
    +  test("nested views (interleaved with temporary views)") {
    +    withView("jtv1", "jtv2", "jtv3", "temp_jtv1", "temp_jtv2", "temp_jtv3") {
           sql("CREATE VIEW jtv1 AS SELECT * FROM jt WHERE id > 3").collect()
           sql("CREATE VIEW jtv2 AS SELECT * FROM jtv1 WHERE id < 6").collect()
           checkAnswer(sql("select count(*) FROM jtv2"), Row(2))
    +
    +      // Checks temporary views
    +      sql("CREATE TEMPORARY VIEW temp_jtv1 AS SELECT * FROM jt WHERE id > 3").collect()
    --- End diff --
    
    Nit: For DDL commands like this one, you don't need to call `.collect()`. Unlike `SELECT`
queries, commands are executed eagerly.


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