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 #16493: [SPARK-19093][SQL] Cached tables are not used in ...
Date Sat, 07 Jan 2017 04:00:04 GMT
Github user gatorsmile commented on a diff in the pull request:

    https://github.com/apache/spark/pull/16493#discussion_r95051550
  
    --- Diff: sql/core/src/test/scala/org/apache/spark/sql/CachedTableSuite.scala ---
    @@ -565,4 +577,67 @@ class CachedTableSuite extends QueryTest with SQLTestUtils with SharedSQLContext
             case i: InMemoryRelation => i
           }.size == 1)
       }
    +
    +  test("SPARK-19093 Caching in side subquery") {
    +    withTempView("t1") {
    +      Seq(1).toDF("c1").createOrReplaceTempView("t1")
    +      spark.catalog.cacheTable("t1")
    +      val cachedPlan =
    +        sql(
    +          """
    +            |SELECT * FROM t1
    +            |WHERE
    +            |NOT EXISTS (SELECT * FROM t1)
    +          """.stripMargin).queryExecution.optimizedPlan
    +      assert(
    +        cachedPlan.collect {
    +          case i: InMemoryRelation => i
    +        }.size == 2)
    --- End diff --
    
    The same here.


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