MaxGekk commented on a change in pull request #29396:
URL: https://github.com/apache/spark/pull/29396#discussion_r468025176
##########
File path:
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/DataSourceV2Strategy.scala
##########
@@ -64,11 +64,14 @@ class DataSourceV2Strategy(session: SparkSession) extends
Strategy with Predicat
}
val rdd = v1Relation.buildScan()
val unsafeRowRDD = DataSourceStrategy.toCatalystRDD(v1Relation, output,
rdd)
- val originalOutputNames = relation.table.schema().map(_.name)
- val requiredColumnsIndex =
output.map(_.name).map(originalOutputNames.indexOf)
+ // `RowDataSourceScanExec` requires the full output instead of the scan
output after column
+ // pruning. However, when we reach here following the v2 code path, we
don't have the full
+ // output anymore. `RowDataSourceScanExec.fullOutput` is actually
meaningless so here we just
+ // pass the pruned output.
+ // TODO: remove `RowDataSourceScanExec.fullOutput`.
Review comment:
Could you create a sub-take and update the TODO like `TODO
(SPARK-XXXXX):`.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]