This is an automated email from the ASF dual-hosted git repository.
felixybw pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-gluten.git
The following commit(s) were added to refs/heads/main by this push:
new 2a23bf16d0 [GLUTEN-10324] Improve the failValidationWithException for
ValidatablePlan (#10325)
2a23bf16d0 is described below
commit 2a23bf16d037427e05d8fcff8458be1e7485c703
Author: Jiaan Geng <[email protected]>
AuthorDate: Tue Aug 5 02:14:19 2025 +0800
[GLUTEN-10324] Improve the failValidationWithException for ValidatablePlan
(#10325)
improve the failValidationWithException for ValidatablePlan
---
.../apache/gluten/execution/ValidatablePlan.scala | 21 ++++++++++++---------
1 file changed, 12 insertions(+), 9 deletions(-)
diff --git
a/gluten-substrait/src/main/scala/org/apache/gluten/execution/ValidatablePlan.scala
b/gluten-substrait/src/main/scala/org/apache/gluten/execution/ValidatablePlan.scala
index 53cf968bd9..34a6c1168d 100644
---
a/gluten-substrait/src/main/scala/org/apache/gluten/execution/ValidatablePlan.scala
+++
b/gluten-substrait/src/main/scala/org/apache/gluten/execution/ValidatablePlan.scala
@@ -42,18 +42,21 @@ trait ValidatablePlan extends GlutenPlan with LogLevelUtil {
// otherwise returns the result of f.
protected def failValidationWithException(f: => ValidationResult)(
finallyBlock: => Unit = ()): ValidationResult = {
+ def makeFailed(e: Exception): ValidationResult = {
+ val message = s"Validation failed with exception from: $nodeName,
reason: ${e.getMessage}"
+ if (glutenConf.printStackOnValidationFailure) {
+ logOnLevel(glutenConf.validationLogLevel, message, e)
+ }
+ ValidationResult.failed(message)
+ }
try {
f
} catch {
- case e @ (_: GlutenNotSupportException | _:
UnsupportedOperationException) =>
- if (!e.isInstanceOf[GlutenNotSupportException]) {
- logDebug(s"Just a warning. This exception perhaps needs to be
fixed.", e)
- }
- val message = s"Validation failed with exception from: $nodeName,
reason: ${e.getMessage}"
- if (glutenConf.printStackOnValidationFailure) {
- logOnLevel(glutenConf.validationLogLevel, message, e)
- }
- ValidationResult.failed(message)
+ case e: GlutenNotSupportException =>
+ logDebug(s"Just a warning. This exception perhaps needs to be fixed.",
e)
+ makeFailed(e)
+ case e: UnsupportedOperationException =>
+ makeFailed(e)
case t: Throwable =>
throw t
} finally {
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]