zml1206 commented on code in PR #8144:
URL: https://github.com/apache/incubator-gluten/pull/8144#discussion_r1870844498


##########
gluten-substrait/src/main/scala/org/apache/gluten/extension/columnar/enumerated/RasOffload.scala:
##########
@@ -118,21 +119,29 @@ object RasOffload {
             // 4. Validate current node. If passed, offload it.
             validator.validate(from) match {
               case Validator.Passed =>
-                val offloadedPlan = base.offload(from)
-                val offloadedNodes = offloadedPlan.collect[ValidatablePlan] {
-                  case t: ValidatablePlan => t
-                }
-                val outComes = 
offloadedNodes.map(_.doValidate()).filter(!_.ok())
-                if (outComes.nonEmpty) {
-                  // 5. If native validation fails on at least one of the 
offloaded nodes, return
-                  // the original one.
-                  //
-                  // TODO: Tag the original plan with fallback reason. This is 
a non-trivial work
-                  //  in RAS as the query plan we got here may be a copy so 
may not propagate tags
-                  //  to original plan.
-                  from
-                } else {
-                  offloadedPlan
+                try {
+                  val offloadedPlan = base.offload(from)
+                  val offloadedNodes = offloadedPlan.collect[ValidatablePlan] {
+                    case t: ValidatablePlan => t
+                  }
+                  val outComes = 
offloadedNodes.map(_.doValidate()).filter(!_.ok())
+                  if (outComes.nonEmpty) {
+                    // 5. If native validation fails on at least one of the 
offloaded nodes, return
+                    // the original one.
+                    //
+                    // TODO: Tag the original plan with fallback reason. This 
is a non-trivial work
+                    //  in RAS as the query plan we got here may be a copy so 
may not propagate tags
+                    //  to original plan.
+                    from
+                  } else {
+                    offloadedPlan
+                  }
+                } catch {
+                  case _: GlutenNotSupportException =>

Review Comment:
   
   I didn't find the place where GlutenNotSupportException is thrown in the 
offload rule. `doValidate()` contains `doValidateInternal()` and 
`doSchemaValidate()`, `doValidateInternal()` has been caught, 
`doSchemaValidate()` will not trigger an exception, so restore it?



-- 
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]

Reply via email to