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

    https://github.com/apache/spark/pull/21574#discussion_r196192774
  
    --- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/DataSourceV2Relation.scala
 ---
    @@ -23,17 +23,24 @@ import org.apache.spark.sql.AnalysisException
     import org.apache.spark.sql.catalyst.analysis.MultiInstanceRelation
     import org.apache.spark.sql.catalyst.expressions.{AttributeReference, 
Expression}
     import org.apache.spark.sql.catalyst.plans.logical.{LeafNode, LogicalPlan, 
Statistics}
    -import org.apache.spark.sql.execution.datasources.DataSourceStrategy
    -import org.apache.spark.sql.sources.{DataSourceRegister, Filter}
    +import org.apache.spark.sql.sources.DataSourceRegister
     import org.apache.spark.sql.sources.v2.{DataSourceOptions, DataSourceV2, 
ReadSupport, ReadSupportWithSchema}
    -import org.apache.spark.sql.sources.v2.reader.{DataSourceReader, 
SupportsPushDownCatalystFilters, SupportsPushDownFilters, 
SupportsPushDownRequiredColumns, SupportsReportStatistics}
    +import org.apache.spark.sql.sources.v2.reader.{DataSourceReader, 
SupportsReportStatistics}
     import org.apache.spark.sql.types.StructType
     
    +/**
    + * A logical plan representing a data source v2 scan.
    + *
    + * @param source An instance of a [[DataSourceV2]] implementation.
    + * @param options The options for this scan. Used to create fresh 
[[DataSourceReader]].
    + * @param userSpecifiedSchema The user-specified schema for this scan. 
Used to create fresh
    + *                            [[DataSourceReader]].
    + */
     case class DataSourceV2Relation(
         source: DataSourceV2,
         output: Seq[AttributeReference],
         options: Map[String, String],
    -    userSpecifiedSchema: Option[StructType] = None)
    +    userSpecifiedSchema: Option[StructType])
    --- End diff --
    
    That's because there are few places that create v2 relations so far, but 
when SQL statements and other paths that don't allow you to supply your own 
schema are added, I think this will be more common. It's okay to remove it, but 
I don't see much value in the change and I like to keep non-functional changes 
to a minimum.


---

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

Reply via email to