You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by cloud-fan <gi...@git.apache.org> on 2016/07/08 08:53:46 UTC

[GitHub] spark pull request #14075: [SPARK-16401] [SQL] Data Source API: Enable Exten...

Github user cloud-fan commented on a diff in the pull request:

    https://github.com/apache/spark/pull/14075#discussion_r70044038
  
    --- Diff: sql/core/src/test/scala/org/apache/spark/sql/test/DataFrameReaderWriterSuite.scala ---
    @@ -82,6 +82,34 @@ class DefaultSource
       }
     }
     
    +/** Dummy provider with only RelationProvider and CreatableRelationProvider. */
    +class DefaultSourceWithoutUserSpecifiedSchema
    +  extends RelationProvider
    +  with CreatableRelationProvider {
    +
    +  case class FakeRelation(sqlContext: SQLContext) extends BaseRelation {
    +    override def schema: StructType = StructType(Seq(StructField("a", StringType)))
    +  }
    +
    +  override def createRelation(
    +      sqlContext: SQLContext,
    +      parameters: Map[String, String]): BaseRelation = {
    +    LastOptions.parameters = parameters
    +    LastOptions.schema = None
    --- End diff --
    
    Why assign values here? We don't check them in the test right?


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