SG011 commented on code in PR #13497:
URL: https://github.com/apache/arrow/pull/13497#discussion_r918634751


##########
cpp/src/gandiva/function_registry_string.cc:
##########
@@ -515,7 +515,13 @@ std::vector<NativeFunction> GetStringFunctionRegistry() {
 
       NativeFunction("translate", {}, DataTypeVector{utf8(), utf8(), utf8()}, 
utf8(),
                      kResultNullIfNull, "translate_utf8_utf8_utf8",
-                     NativeFunction::kNeedsContext | 
NativeFunction::kCanReturnErrors)};
+                     NativeFunction::kNeedsContext | 
NativeFunction::kCanReturnErrors),
+
+      NativeFunction("encode", {}, DataTypeVector{utf8(), utf8()}, utf8(),
+                     kResultNullIfNull, "gdv_fn_encode", 
NativeFunction::kNeedsContext),
+
+      NativeFunction("decode", {}, DataTypeVector{utf8(), utf8()}, utf8(),
+                     kResultNullIfNull, "gdv_fn_decode", 
NativeFunction::kNeedsContext)};

Review Comment:
   So basically what encode function does is it converts a string(utf8 format) 
to a to it's corresponding utf16 encoding.
   And decode converts from the corresponding utf16 encoding to utf8 format.



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

Reply via email to