Skip to content

Commit

Permalink
[VL] RAS: Validate against all offloaded plan nodes to decide whether…
Browse files Browse the repository at this point in the history
… to do this offload (#6017)
  • Loading branch information
zhztheplayer authored Jun 11, 2024
1 parent ec3e92e commit f9ab772
Showing 1 changed file with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -105,13 +105,13 @@ object RasOffload {
validator.validate(from) match {
case Validator.Passed =>
val offloaded = base.offload(from)
offloaded match {
case t: GlutenPlan if !t.doValidate().isValid =>
// 4. If native validation fails on the offloaded node, return the
// original one.
from
case other =>
other
val offloadedNodes = offloaded.collect[GlutenPlan] { case t: GlutenPlan => t }
if (offloadedNodes.exists(!_.doValidate().isValid)) {
// 4. If native validation fails on the offloaded node, return the
// original one.
from
} else {
offloaded
}
case Validator.Failed(reason) =>
from
Expand Down

0 comments on commit f9ab772

Please sign in to comment.