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


##########
spark/src/main/scala/org/apache/comet/serde/statics.scala:
##########
@@ -35,7 +36,9 @@ object CometStaticInvoke extends 
CometExpressionSerde[StaticInvoke] {
     Map(
       ("readSidePadding", classOf[CharVarcharCodegenUtils]) -> 
CometScalarFunction(
         "read_side_padding"),
-      ("isLuhnNumber", classOf[ExpressionImplUtils]) -> 
CometScalarFunction("luhn_check"))
+      ("isLuhnNumber", classOf[ExpressionImplUtils]) -> 
CometScalarFunction("luhn_check"),
+      ("encode", UrlCodec.getClass) -> CometUrlEncodeStaticInvoke,
+      ("decode", UrlCodec.getClass) -> CometUrlDecodeStaticInvoke)

Review Comment:
   Looking at the Spark source for UrlEncode / UrlDecode, the rewrite uses:     
        
                                                                                
                                                                                
                                          
     StaticInvoke(UrlCodec.getClass, dataType, "encode", Seq(child), ...)       
                                                                                
                                          
     StaticInvoke(UrlCodec.getClass, dataType, "decode", Seq(child, 
Literal(failOnError)), ...)                                                     
                                                      
                                                                                
                                                                                
                                          
     The third argument is the JVM method name on UrlCodec, which is literally 
"encode" and "decode". The user-facing SQL names url_encode / url_decode come 
from prettyName, not functionName. 



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