spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From HyukjinKwon <...@git.apache.org>
Subject [GitHub] spark pull request: [SPARK-12476][SQL] Implement JdbcRelation#unha...
Date Tue, 22 Dec 2015 08:09:05 GMT
Github user HyukjinKwon commented on a diff in the pull request:

    https://github.com/apache/spark/pull/10427#discussion_r48229951
  
    --- Diff: sql/core/src/test/scala/org/apache/spark/sql/jdbc/JDBCSuite.scala ---
    @@ -176,14 +178,23 @@ class JDBCSuite extends SparkFunSuite with BeforeAndAfter with SharedSQLContext
       }
     
       test("SELECT * WHERE (simple predicates)") {
    -    assert(stripSparkFilter(sql("SELECT * FROM foobar WHERE THEID < 1")).collect().size
== 0)
    -    assert(stripSparkFilter(sql("SELECT * FROM foobar WHERE THEID != 2")).collect().size
== 2)
    -    assert(stripSparkFilter(sql("SELECT * FROM foobar WHERE THEID = 1")).collect().size
== 1)
    -    assert(stripSparkFilter(sql("SELECT * FROM foobar WHERE NAME = 'fred'")).collect().size
== 1)
    -    assert(stripSparkFilter(sql("SELECT * FROM foobar WHERE NAME > 'fred'")).collect().size
== 2)
    -    assert(stripSparkFilter(sql("SELECT * FROM foobar WHERE NAME != 'fred'")).collect().size
== 2)
    -    assert(stripSparkFilter(sql("SELECT * FROM nulltypes WHERE A IS NULL")).collect().size
== 1)
    -    assert(stripSparkFilter(sql("SELECT * FROM nulltypes WHERE A IS NOT NULL")).collect().size
== 0)
    +    val doFilterPushdown = (df: DataFrame) => {
    +      val schema = df.schema
    +      val parentPlan = df.queryExecution.executedPlan
    +      assert(parentPlan.isInstanceOf[PhysicalRDD])
    --- End diff --
    
    Should we maybe add some comments or messages to know what this `assert` mean?


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