andygrove commented on code in PR #1694:
URL: https://github.com/apache/datafusion-comet/pull/1694#discussion_r2066551903


##########
spark/src/main/scala/org/apache/comet/CometSparkSessionExtensions.scala:
##########
@@ -397,19 +397,34 @@ class CometSparkSessionExtensions
             op,
             CometGlobalLimitExec(_, op, op.limit, op.child, 
SerializedPlan(None)))
 
-        case op: CollectLimitExec
-            if isCometNative(op.child) && 
CometConf.COMET_EXEC_COLLECT_LIMIT_ENABLED.get(conf)
-              && isCometShuffleEnabled(conf)
-              && op.offset == 0 =>
-          QueryPlanSerde
-            .operator2Proto(op)
-            .map { nativeOp =>
-              val cometOp =
-                CometCollectLimitExec(op, op.limit, op.offset, op.child)
-              CometSinkPlaceHolder(nativeOp, op, cometOp)
+        case op: CollectLimitExec =>
+          val fallbackReasons = new ListBuffer[String]()
+          if (!CometConf.COMET_EXEC_COLLECT_LIMIT_ENABLED.get(conf)) {
+            fallbackReasons += 
s"${CometConf.COMET_EXEC_COLLECT_LIMIT_ENABLED.key} is false"
+          }
+          if (!isCometShuffleEnabled(conf)) {
+            fallbackReasons += "Comet shuffle is not enabled"
+          }

Review Comment:
   I'm actually not sure why we do not support `CollectLimitExec` if Comet 
shuffle is disabled :thinking: 



-- 
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: github-unsubscr...@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org

Reply via email to