rui-mo commented on code in PR #13103:
URL: https://github.com/apache/gluten/pull/13103#discussion_r4407139133
##########
backends-velox/src/main/scala/org/apache/gluten/backendsapi/velox/VeloxValidatorApi.scala:
##########
@@ -38,12 +39,32 @@ import io.substrait.proto.SimpleExtensionDeclaration
import scala.collection.JavaConverters._
import scala.collection.mutable.ArrayBuffer
-class VeloxValidatorApi extends ValidatorApi {
+class VeloxValidatorApi extends ValidatorApi with Logging {
import VeloxValidatorApi._
- /** For velox backend, key validation is on native side. */
- override def doExprValidate(substraitExprName: String, expr: Expression):
Boolean =
- true
+ /**
+ * Enforce decimal ROUND scale compatibility on the JVM independently of
optional native plan
+ * validation.
+ */
+ override def doExprValidate(substraitExprName: String, expr: Expression):
Boolean = expr match {
+ case round: Round if round.child.dataType.isInstanceOf[DecimalType] =>
Review Comment:
> spark.gluten.sql.enable.native.validation = false
The intention is to perform native validation whenever possible, while
avoiding introducing native-engine-specific logic into Scala. Instead, we aim
to maintain a unified interface between Scala and native validation.
This configuration is primarily intended for debugging. It forces all
computation to be offloaded to the native engine without fallback, meaning that
unsupported operations will result in runtime exceptions rather than falling
back to the original engine.
Does this approach make sense to you? Feel free to update the relevant
documentation if anything is unclear.
--
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]