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

    https://github.com/apache/spark/pull/18600#discussion_r126693691
  
    --- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/execution/DataSourceScanExec.scala 
---
    @@ -73,34 +72,24 @@ trait DataSourceScanExec extends LeafExecNode with 
CodegenSupport {
     
     /** Physical plan node for scanning data from a relation. */
     case class RowDataSourceScanExec(
    -    output: Seq[Attribute],
    +    fullOutput: Seq[Attribute],
    +    requiredColumnsIndex: Seq[Int],
    +    filters: Set[Filter],
         rdd: RDD[InternalRow],
         @transient relation: BaseRelation,
    -    override val outputPartitioning: Partitioning,
    -    override val metadata: Map[String, String],
    -    override val metastoreTableIdentifier: Option[TableIdentifier])
    +    override val tableIdentifier: Option[TableIdentifier])
       extends DataSourceScanExec {
     
    +  def output: Seq[Attribute] = requiredColumnsIndex.map(fullOutput)
    +
       override lazy val metrics =
         Map("numOutputRows" -> SQLMetrics.createMetric(sparkContext, "number 
of output rows"))
     
    -  val outputUnsafeRows = relation match {
    -    case r: HadoopFsRelation if r.fileFormat.isInstanceOf[ParquetSource] =>
    -      !SparkSession.getActiveSession.get.sessionState.conf.getConf(
    -        SQLConf.PARQUET_VECTORIZED_READER_ENABLED)
    -    case _: HadoopFsRelation => true
    --- End diff --
    
    `HadoopFsRelation` never goes into `RowDataSourceScanExec`


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

Reply via email to