Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import org.apache.gluten.config.GlutenConfig
import org.apache.gluten.execution._
import org.apache.gluten.expression.ExpressionUtils
import org.apache.gluten.extension.columnar.FallbackTags
import org.apache.gluten.extension.columnar.heuristic.LegacyOffload
import org.apache.gluten.extension.columnar.offload.OffloadSingleNode
import org.apache.gluten.sql.shims.SparkShimLoader

Expand Down Expand Up @@ -232,7 +231,6 @@ object Validators {
private class FallbackByNativeValidation(offloadRules: Seq[OffloadSingleNode])
extends Validator
with Logging {
private val offloadAttempt: LegacyOffload = LegacyOffload(offloadRules)
override def validate(plan: SparkPlan): Validator.OutCome = {
val offloadedNode = offloadAttempt.apply(plan)
val out = offloadedNode match {
Expand All @@ -244,6 +242,14 @@ object Validators {
}
out
}

private val offloadAttempt: SparkPlan => SparkPlan = {
node =>
offloadRules.foldLeft(node) {
case (node, rule) =>
rule.offload(node)
}
}
}

/**
Expand Down
Loading