Github user cloud-fan commented on a diff in the pull request:
https://github.com/apache/spark/pull/14075#discussion_r70106028
--- Diff:
sql/core/src/test/scala/org/apache/spark/sql/test/DataFrameReaderWriterSuite.scala
---
@@ -82,6 +82,32 @@ 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
--- End diff --
hmmm, is it a convention to assign parameters to `LastOptions`? I think the
test can work without it.
---
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 [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]