cloud-fan commented on a change in pull request #34499:
URL: https://github.com/apache/spark/pull/34499#discussion_r745420420
##########
File path:
sql/core/src/main/scala/org/apache/spark/sql/execution/SparkPlan.scala
##########
@@ -322,7 +322,12 @@ abstract class SparkPlan extends QueryPlan[SparkPlan] with
Logging with Serializ
*/
private def getByteArrayRdd(
n: Int = -1, takeFromEnd: Boolean = false): RDD[(Long, Array[Byte])] = {
- execute().mapPartitionsInternal { iter =>
+ val rdd = if (supportsColumnar) {
+ ColumnarToRowExec(this).execute()
Review comment:
Sorry for the late review, but I have a question about this change.
Actually, `SparkPlan.execute` has the same issue, and we rely on the
framework to add `ColumnarToRowExec`, so that we never call `execute` on a
spark plan that is columnar. Why do we take a different approach for
`SparkPlan.executeCollect`? Is it possible to guarantee that we never call
`executeCollect` on a columnar spark plan, with the existing columnar framework?
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]