cloud-fan commented on a change in pull request #32570:
URL: https://github.com/apache/spark/pull/32570#discussion_r634380013
##########
File path:
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/DataSourceV2Strategy.scala
##########
@@ -120,20 +122,22 @@ class DataSourceV2Strategy(session: SparkSession) extends
Strategy with Predicat
scanExec
Review comment:
We can't do `if (scanExec.supportsColumnar)` now. We should just call
`withProjectAndFilter`
##########
File path:
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/DataSourceV2Strategy.scala
##########
@@ -120,20 +122,22 @@ class DataSourceV2Strategy(session: SparkSession) extends
Strategy with Predicat
scanExec
} else {
// Add a Project here to make sure we produce unsafe rows.
- ProjectExec(r.output, scanExec)
+ withProjectAndFilter(p, f, scanExec, !scanExec.supportsColumnar)
}
withProjection :: Nil
- case r: StreamingDataSourceV2Relation if r.startOffset.isDefined &&
r.endOffset.isEmpty =>
+ case PhysicalOperation(p, f, r: StreamingDataSourceV2Relation)
+ if r.startOffset.isDefined && r.endOffset.isEmpty =>
+
val continuousStream = r.stream.asInstanceOf[ContinuousStream]
val scanExec = ContinuousScanExec(r.output, r.scan, continuousStream,
r.startOffset.get)
val withProjection = if (scanExec.supportsColumnar) {
Review comment:
ditto
--
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]