parthchandra commented on code in PR #577:
URL: https://github.com/apache/datafusion-comet/pull/577#discussion_r1649457828


##########
spark/src/main/scala/org/apache/comet/CometSparkSessionExtensions.scala:
##########
@@ -594,22 +630,41 @@ class CometSparkSessionExtensions
             if (isCometNative(newPlan) || isCometBroadCastForceEnabled(conf)) {
               newPlan
             } else {
-              if (!isCometOperatorEnabled(
-                  conf,
-                  "broadcastExchangeExec") && 
!isCometBroadCastForceEnabled(conf)) {
-                withInfo(plan, "Native Broadcast is not enabled")
+              if (isCometNative(newPlan)) {
+                val reason =
+                  getCometBroadcastNotEnabledReason(conf).getOrElse("no reason 
available")
+                withInfo(plan, s"Broadcast is not enabled: $reason")
               }
               plan
             }
           } else {
+            withInfo(
+              plan,
+              s"${plan.nodeName} is not native because the following children 
are not native " +
+                s"${explainChildNotNative(plan)}")
             plan
           }
 
         // this case should be checked only after the previous case checking 
for a
         // child BroadcastExchange has been applied, otherwise that transform
         // never gets applied
         case op: BroadcastHashJoinExec if 
!op.children.forall(isCometNative(_)) =>
-          withInfo(op, "BroadcastHashJoin disabled because not all child plans 
are native")
+          withInfo(
+            op,
+            "BroadcastHashJoin is not enabled because the following children 
are not native " +
+              s"${explainChildNotNative(op)}")
+          op
+        case op: BroadcastHashJoinExec
+            if isCometOperatorEnabled(conf, "broadcast_hash_join") &&
+              !op.children.forall(isCometNative(_)) =>
+          withInfo(
+            op,
+            "BroadcastHashJoin is not enabled because the following children 
are not native " +
+              s"${explainChildNotNative(op)}")
+          op
+
+        case op: BroadcastHashJoinExec if !isCometOperatorEnabled(conf, 
"broadcast_hash_join") =>
+          withInfo(op, "BroadcastHashJoin is not enabled")

Review Comment:
   Yes, it is. Removed. Thank you! 



-- 
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