minni31 commented on code in PR #13223:
URL: https://github.com/apache/gluten/pull/13223#discussion_r4489860466


##########
backends-velox/src/main/scala/org/apache/gluten/backendsapi/velox/VeloxValidatorApi.scala:
##########
@@ -42,8 +43,13 @@ class VeloxValidatorApi extends ValidatorApi {
   import VeloxValidatorApi._
 
   /** For velox backend, key validation is on native side. */
-  override def doExprValidate(substraitExprName: String, expr: Expression): 
Boolean =
-    true
+  override def doExprValidate(substraitExprName: String, expr: Expression): 
Boolean = {
+    expr match {
+      case formatString: FormatString =>
+        supportsFormatString(formatString)
+      case _ => true

Review Comment:
   Spark registers both SQL names as the same `FormatString` Catalyst 
expression, not a separate `Printf`: [Spark 
3.5.7](https://github.com/apache/spark/blob/v3.5.7/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/FunctionRegistry.scala#L530-L552)
 and [Spark 
4.1.0](https://github.com/apache/spark/blob/v4.1.0/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/FunctionRegistry.scala#L577-L599).
 The existing `case formatString: FormatString` therefore applies the same 
validation to both names.
   
   At `0cee799c3`, `VeloxFormatStringSuite` covers native integer formatting 
for both names, compares dynamic/unsupported-pattern fallback against vanilla 
Spark for both, and checks malformed/excessive-width fallback during planning. 
No additional Catalyst match is needed.



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