parthchandra commented on code in PR #3227:
URL: https://github.com/apache/datafusion-comet/pull/3227#discussion_r2722911503
##########
spark/src/main/scala/org/apache/comet/rules/CometExecRule.scala:
##########
@@ -207,7 +207,20 @@ case class CometExecRule(session: SparkSession) extends
Rule[SparkPlan] {
w.child
case op: DataWritingCommandExec =>
- convertToComet(op, CometDataWritingCommand).getOrElse(op)
+ // Get the actual data source child that will feed data to the native
writer
Review Comment:
Would it be more generic to do this in `CometExecRule.convertToComet` -
```
if (op.children.nonEmpty &&
!op.children.forall(_.isInstanceOf[CometNativeExec])) {
// For operators like writes, require all children to be native
if (requiresNativeChildren(handler)) {
return None // Fallback to Spark
}
...
}
```
--
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]