andygrove commented on code in PR #2840:
URL: https://github.com/apache/datafusion-comet/pull/2840#discussion_r2585958051
##########
spark/src/main/scala/org/apache/comet/rules/CometExecRule.scala:
##########
@@ -183,21 +183,6 @@ case class CometExecRule(session: SparkSession) extends
Rule[SparkPlan] {
*/
// spotless:on
private def transform(plan: SparkPlan): SparkPlan = {
- def operator2ProtoIfAllChildrenAreNative(op: SparkPlan): Option[Operator]
= {
- if (op.children.forall(_.isInstanceOf[CometNativeExec])) {
- operator2Proto(op,
op.children.map(_.asInstanceOf[CometNativeExec].nativeOp): _*)
- } else {
- None
- }
- }
-
- /**
- * Convert operator to proto and then apply a transformation to wrap the
proto in a new plan.
- */
- def newPlanWithProto(op: SparkPlan, fun: Operator => SparkPlan): SparkPlan
= {
- operator2ProtoIfAllChildrenAreNative(op).map(fun).getOrElse(op)
- }
Review Comment:
I moved these methods out of the `transform` method so that they can be
accessed elsewhere
--
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]