You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by wangyum <gi...@git.apache.org> on 2018/11/02 12:22:29 UTC

[GitHub] spark pull request #22530: [SPARK-24869][SQL] Fix SaveIntoDataSourceCommand'...

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

    https://github.com/apache/spark/pull/22530#discussion_r230355700
  
    --- Diff: sql/core/src/test/scala/org/apache/spark/sql/test/TestSQLContext.scala ---
    @@ -39,7 +39,10 @@ private[spark] class TestSparkSession(sc: SparkContext) extends SparkSession(sc)
     
       @transient
       override lazy val sessionState: SessionState = {
    -    new TestSQLSessionStateBuilder(this, None).build()
    +    val ss = new TestSQLSessionStateBuilder(this, None).build()
    +    // Add FakeDataSourceStrategy to test FakeRelation, see SPARK-24869 for more details.
    +    ss.experimentalMethods.extraStrategies = FakeDataSourceStrategy(ss.conf) :: Nil
    --- End diff --
    
    `FakeDataSourceStrategy` is needed. otherwise::
    ```java
    java.lang.AssertionError: assertion failed: No plan for Relation[a#23] FakeRelation(org.apache.spark.sql.SQLContext@6838be66)
    ```


---

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