danielwei816 commented on code in PR #7508:
URL: https://github.com/apache/datafusion-comet/pull/7508#discussion_r4609382765


##########
spark/src/main/scala/org/apache/spark/sql/comet/CometNativeScanExec.scala:
##########
@@ -79,7 +79,7 @@ case class CometNativeScanExec(
     // AQE rewrites DPP placeholders in the live scan before transition 
reversion.
     // The frozen originalPlan can still contain unexecutable 
SubqueryAdaptiveBroadcastExecs.
     val restoredScan =
-      originalPlan.copy(partitionFilters = partitionFilters, dataFilters = 
dataFilters)
+      CometScanUtils.copyScanWithFilters(originalPlan, partitionFilters, 
dataFilters)
     originalPlan.logicalLink.foreach(restoredScan.setLogicalLink)

Review Comment:
   Thanks! I removed the extra `setLogicalLink` call and verified that 
`makeCopy` preserves the logical link when Comet falls back 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]

Reply via email to