allisonwang-db commented on a change in pull request #32606:
URL: https://github.com/apache/spark/pull/32606#discussion_r636491722
##########
File path:
sql/core/src/test/scala/org/apache/spark/sql/connector/DataSourceV2Suite.scala
##########
@@ -435,6 +436,27 @@ class DataSourceV2Suite extends QueryTest with
SharedSparkSession with AdaptiveS
}
}
}
+
+ Seq("true", "false").foreach { codegenEnabled =>
+ test("SPARK-35287: project generating unsafe row " +
+ s"should not be removed (codegen=$codegenEnabled)") {
Review comment:
We can move the `codegenEnabled` config into the test itself and move
this test to `RemoveRedundantProjectsSuite`.
##########
File path:
sql/core/src/main/scala/org/apache/spark/sql/execution/RemoveRedundantProjects.scala
##########
@@ -97,6 +97,7 @@ object RemoveRedundantProjects extends Rule[SparkPlan] {
// If a DataSourceV2ScanExec node does not support columnar, a
ProjectExec node is required
// to convert the rows to UnsafeRow. See DataSourceV2Strategy for more
details.
case d: DataSourceV2ScanExecBase if !d.supportsColumnar => false
+ case FilterExec(_, d: DataSourceV2ScanExecBase) if !d.supportsColumnar
=> false
Review comment:
Can we add a comment here to explain the `PhysicalOperation` pattern?
--
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]