zhztheplayer commented on code in PR #8585:
URL: https://github.com/apache/incubator-gluten/pull/8585#discussion_r1924667284
##########
gluten-substrait/src/main/scala/org/apache/gluten/extension/columnar/PushDownInputFileExpression.scala:
##########
@@ -104,6 +104,11 @@ object PushDownInputFileExpression {
u.copy(children = newFirstChild +: newOtherChildren)
case p => p.withNewChildren(p.children.map(child =>
addMetadataCol(child, replacedExprs)))
}
+
+ def addFallbackTag(plan: SparkPlan): SparkPlan = {
+ FallbackTags.add(plan, "fallback input file expression")
Review Comment:
Can we rephrase with `Project added by rule PushDownInputFileExpression
should not be offloaded by design ` or so? Thanks.
##########
gluten-core/src/main/scala/org/apache/gluten/extension/columnar/heuristic/AddFallbackTags.scala:
##########
@@ -25,7 +25,10 @@ import org.apache.spark.sql.execution.SparkPlan
// Add fallback tags when validator returns negative outcome.
case class AddFallbackTags(validator: Validator) extends Rule[SparkPlan] {
def apply(plan: SparkPlan): SparkPlan = {
- plan.foreachUp { case p => addFallbackTag(p) }
+ plan.foreachUp {
+ case p if FallbackTags.maybeOffloadable(p) => addFallbackTag(p)
+ case _ =>
+ }
Review Comment:
Why this change is needed? Thanks.
--
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]