wForget commented on code in PR #4234:
URL: https://github.com/apache/datafusion-comet/pull/4234#discussion_r3206709449


##########
spark/src/main/scala/org/apache/comet/rules/EliminateRedundantTransitions.scala:
##########
@@ -98,6 +101,26 @@ case class EliminateRedundantTransitions(session: 
SparkSession) extends Rule[Spa
       case CometNativeColumnarToRowExec(sparkToColumnar: 
CometSparkToColumnarExec) =>
         sparkToColumnar.child
       case CometSparkToColumnarExec(child: CometSparkToColumnarExec) => child
+      // Replace MapInBatchExec (PythonMapInArrowExec / MapInArrowExec / 
MapInPandasExec) that has
+      // a ColumnarToRow child with CometPythonMapInArrowExec to avoid the 
unnecessary
+      // Arrow->Row->Arrow round-trip. The matchers are version-shimmed: Spark 
3.4 returns None
+      // (it lacks the required APIs) and Spark 4.1+ matches the renamed 
`MapInArrowExec`.
+      case p: SparkPlan

Review Comment:
   The current PR only includes optimizations on jvm side, splitting it into a 
separate module might be a bit overengineering.



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