zhztheplayer commented on code in PR #7360:
URL: https://github.com/apache/incubator-gluten/pull/7360#discussion_r1802547315
##########
backends-velox/src/main/scala/org/apache/gluten/execution/ColumnarPartialProjectExec.scala:
##########
@@ -172,6 +172,20 @@ case class ColumnarPartialProjectExec(original:
ProjectExec, child: SparkPlan)(
}
}
+ private def toVeloxBatch(input: ColumnarBatch): ColumnarBatch = {
+ if (VeloxColumnarBatches.isVeloxBatch(input)) {
+ return input
+ }
+ if (ColumnarBatches.isHeavyBatch(input)) {
+ if (input.numCols() == 0) {
+ return input
+ }
+ return VeloxColumnarBatches.toVeloxBatch(
+ ColumnarBatches.offload(ArrowBufferAllocators.contextInstance(),
input))
+ }
Review Comment:
> The ArrowCsvReader may produce Arrow format heavy ColumnarBatch, does it
work?
It should work. Planner should take the work to insert Arrow-to-Velox
transitions now, you can run some tests to see the final plan Gluten gives.
--
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]