Skip to content

Commit

Permalink
remove check for top level operator being native
Browse files Browse the repository at this point in the history
  • Loading branch information
andygrove committed May 13, 2024
1 parent 22409f4 commit 8e800ec
Showing 1 changed file with 11 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -734,19 +734,20 @@ class CometSparkSessionExtensions
} else {
var newPlan = transform(plan)

// if the plan cannot be run natively then explain why (when appropriate config is enabled)
if (CometConf.COMET_EXPLAIN_FALLBACK_ENABLED.get() && !isCometNative(newPlan)) {
// if the plan cannot be run fully natively then explain why (when appropriate
// config is enabled)
if (CometConf.COMET_EXPLAIN_FALLBACK_ENABLED.get()) {
new ExtendedExplainInfo().extensionInfo(newPlan) match {
case reasons if reasons.isEmpty =>
logWarning(
"Comet cannot execute this plan natively, but no reason is given. " +
"This is likely a bug.")
case reasons if reasons.size == 1 =>
logWarning(s"Comet cannot execute this plan natively because ${reasons.head}")
case reasons =>
logWarning(
"Comet cannot execute this plan natively because:\n\t- " +
s"${reasons.mkString("\n\t- ")}")
"Comet cannot execute some parts of this plan natively " +
s"because ${reasons.head}")
case reasons if reasons.size > 1 =>
logWarning(
"Comet cannot execute some parts of execute this plan natively" +
s" because:\n\t- ${reasons.mkString("\n\t- ")}")
case _ =>
// no reasons recorded
}
}

Expand Down

0 comments on commit 8e800ec

Please sign in to comment.