zhztheplayer commented on code in PR #7360:
URL: https://github.com/apache/incubator-gluten/pull/7360#discussion_r1802276252


##########
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:
   ```
   if (batch is not in velox format) {
     convert batch to velox
   }
   ```
   
   Such logics are considered implicit transitions and were removed in effort 
of https://github.com/apache/incubator-gluten/issues/7313. 
   
   Operators now have certain input formats so we can make clear assumption 
that which batch is in which format. So let's remove these implicit 
transitions. Thanks.



-- 
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]

Reply via email to