rluvaton commented on code in PR #1793:
URL: https://github.com/apache/datafusion-comet/pull/1793#discussion_r2109431765
##########
spark/src/main/scala/org/apache/comet/serde/QueryPlanSerde.scala:
##########
@@ -2406,19 +2406,19 @@ object QueryPlanSerde extends Logging with
CometExprShim {
// TODO this could be optimized more to stop walking the tree on
hitting
// certain operators such as join or aggregate which will copy
batches
- def containsNativeCometScan(plan: SparkPlan): Boolean = {
+ def containsNonDataFusionScan(plan: SparkPlan): Boolean = {
plan match {
- case w: CometScanWrapper =>
containsNativeCometScan(w.originalPlan)
- case scan: CometScanExec => scan.scanImpl ==
CometConf.SCAN_NATIVE_COMET
+ case _: CometScanWrapper => true
+ case scan: CometScanExec => scan.scanImpl !=
CometConf.SCAN_NATIVE_DATAFUSION
case _: CometNativeScanExec => false
- case _ => plan.children.exists(containsNativeCometScan)
+ case _ => plan.children.isEmpty ||
plan.children.exists(containsNonDataFusionScan)
Review Comment:
exists return false for empty children as it means that this is the data
source, right? and if so it using the ScanExec of rust and not ScanExec of
DataFusion
--
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]