Zouxxyy commented on code in PR #10763:
URL: 
https://github.com/apache/incubator-gluten/pull/10763#discussion_r2374522254


##########
gluten-core/src/main/scala/org/apache/gluten/extension/columnar/transition/package.scala:
##########
@@ -65,11 +65,11 @@ package object transition {
     }
   }
 
-  // Extractor for Gluten's C2C
+  // Extractor for Gluten's C2C with different convention
   object ColumnarToColumnarLike {
     def unapply(plan: SparkPlan): Option[SparkPlan] = {
       plan match {
-        case c2c: ColumnarToColumnarTransition =>
+        case c2c: ColumnarToColumnarTransition if !c2c.isSameConvention =>

Review Comment:
   @zhztheplayer , Not sure if my understanding is correct, in 
`InsertTransitions` we removeForNode `ColumnarToColumnarLike`, and then 
`fillWithTransitions`
   
   ```scala
   case class InsertTransitions(convReq: ConventionReq) extends Rule[SparkPlan] 
{
     private val convFunc = ConventionFunc.create()
   
     override def apply(plan: SparkPlan): SparkPlan = {
       // Remove all transitions at first.
       val removed = RemoveTransitions.apply(plan)
       val filled = fillWithTransitions(removed)
       val out = Transitions.enforceReq(filled, convReq)
       out
     }
   ```
   
   but in VeloxBatchType we have no the Transitions, so after we remove node, 
we loss VeloxResizeBatchesExec
   ```scala
   object VeloxBatchType extends Convention.BatchType {
     override protected def registerTransitions(): Unit = {
       fromRow(Convention.RowType.VanillaRowType, RowToVeloxColumnarExec.apply)
       toRow(Convention.RowType.VanillaRowType, VeloxColumnarToRowExec.apply)
       fromBatch(ArrowBatchTypes.ArrowNativeBatchType, 
ArrowColumnarToVeloxColumnarExec.apply)
       toBatch(ArrowBatchTypes.ArrowNativeBatchType, Transition.empty)
     }
   }
   ```



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