zhztheplayer commented on code in PR #8798:
URL: https://github.com/apache/incubator-gluten/pull/8798#discussion_r1969754211


##########
gluten-substrait/src/main/scala/org/apache/gluten/extension/ValidationResult.scala:
##########
@@ -26,6 +26,7 @@ import org.apache.spark.sql.catalyst.trees.TreeNode
 sealed trait ValidationResult {
   def ok(): Boolean
   def reason(): String
+  def merge(other: ValidationResult): ValidationResult

Review Comment:
   Just my 2 cents, but would suggest just adding a static merge method, say:
   
   ```scala
   def merge(left: ValidationResult, right: ValidationResult): ValidationResult 
=
     (left.ok(), right.ok()) match {
       case (true, true) =>
         succeeded
       case (false, false) =>
         failed(s"${left.reason()}\n - ${right.reason()}")
       case (true, false) =>
         right
       case (false, true) =>
         left
     }
   ```



##########
shims/common/src/main/scala/org/apache/gluten/config/GlutenConfig.scala:
##########
@@ -1310,6 +1312,12 @@ object GlutenConfig {
       .booleanConf
       .createWithDefault(false)
 
+  val VALIDATION_FAIL_FAST =
+    buildConf("spark.gluten.sql.validation.failFast")
+      .internal()
+      .booleanConf
+      .createWithDefault(true)

Review Comment:
   It's likely a general improvement. Do we really need this option?



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