zhztheplayer commented on code in PR #9802:
URL: https://github.com/apache/incubator-gluten/pull/9802#discussion_r2114156264
##########
gluten-substrait/src/test/scala/org/apache/gluten/test/FallbackUtil.scala:
##########
@@ -67,9 +67,13 @@ object FallbackUtil extends Logging with
AdaptiveSparkPlanHelper {
}
def hasFallback(plan: SparkPlan): Boolean = {
- val fallbackOperator = collectWithSubqueries(plan) { case plan => plan
}.filterNot(
- plan => plan.isInstanceOf[GlutenPlan] || skip(plan))
+ val fallbackOperator =
+ collectWithSubqueries(plan) { case plan => plan }.filter(plan =>
nodeHasFallback(plan))
fallbackOperator.foreach(operator => log.info(s"gluten fallback
operator:{$operator}"))
fallbackOperator.nonEmpty
}
+
+ def nodeHasFallback(plan: SparkPlan): Boolean = {
+ !plan.isInstanceOf[GlutenPlan] && !skip(plan)
+ }
Review Comment:
Just to prepare a API for the following potential use in the future:
```scala
planListeners.assertNoNodeExists(nodeHasFallback)
```
--
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]