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


##########
spark/src/main/spark-4.0/org/apache/comet/shims/CometExprShim.scala:
##########
@@ -93,6 +93,19 @@ trait CometExprShim extends CommonStringExprs {
         val Seq(bin, charset, _, _) = s.arguments
         stringDecode(expr, charset, bin, inputs, binding)
 
+      case s: StaticInvoke
+          if s.staticObject == classOf[Encode] &&
+            s.dataType.isInstanceOf[BinaryType] &&
+            s.functionName == "encode" &&
+            s.arguments.size == 4 &&
+            s.inputTypes == Seq(
+              StringTypeWithCollation(supportsTrimCollation = true),
+              StringTypeWithCollation(supportsTrimCollation = true),
+              BooleanType,
+              BooleanType) =>
+        val Seq(value, charset, _, _) = s.arguments
+        stringEncode(expr, charset, value, inputs, binding)

Review Comment:
   This looks identical for all Spark 4.x versions - could this move to the 
spark-4.x shim to avoid duplicating?



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