andygrove commented on code in PR #5692:
URL: https://github.com/apache/datafusion-comet/pull/5692#discussion_r3938192745


##########
spark/src/main/scala/org/apache/comet/serde/statics.scala:
##########
@@ -78,16 +95,38 @@ object CometStaticInvoke extends 
CometExpressionSerde[StaticInvoke] {
       case Some(handler) =>
         handler.convert(expr, inputs, binding)
       case None =>
-        // Every Iceberg system function is named `invoke`, so name the 
declaring class too.
-        withFallbackReason(
-          expr,
-          s"Static invoke expression: ${expr.functionName} is not supported " +
-            s"(declared on ${expr.staticObject.getName})")
-        None
+        // Nothing in the allowlist covers this lowering, so run Spark's own 
implementation inside
+        // the Comet pipeline rather than failing the whole operator back to 
Spark.
+        // `StaticInvoke.doGenCode` emits a static method call, so the kernel 
matches Spark by
+        // construction. Spark 4.x keeps lowering more `RuntimeReplaceable` 
functions this way
+        // (`encode`, `is_valid_utf8`, the `TIME` family, ...) and `lpad` / 
`rpad` on binary has
+        // lowered to `StaticInvoke(ByteArray, ...)` since Spark 3.4.
+        //
+        // The encoder and deserializer trees that make up most `StaticInvoke` 
usage in typed
+        // Dataset operations are unaffected: their arguments are 
`ObjectType`, which
+        // `CometBatchKernelCodegen.isSupportedDataType` rejects, so the 
dispatcher declines them
+        // and they fall back exactly as before.
+        CometStaticInvokeCodegenDispatch.convert(expr, inputs, binding).orElse 
{

Review Comment:
   @-



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