ViniciusSouzaRoque commented on a change in pull request #12333:
URL: https://github.com/apache/arrow/pull/12333#discussion_r838407529



##########
File path: cpp/src/gandiva/gdv_function_stubs.cc
##########
@@ -1165,6 +1165,219 @@ int32_t gdv_fn_cast_intervalyear_utf8_int32(int64_t 
context_ptr, int64_t holder_
   auto* holder = reinterpret_cast<gandiva::IntervalYearsHolder*>(holder_ptr);
   return (*holder)(context, data, data_len, in1_validity, out_valid);
 }
+
+GANDIVA_EXPORT
+const char* translate_utf8_utf8_utf8(int64_t context, const char* in, int32_t 
in_len,

Review comment:
       This implementation follow the PostGreSQL Translate example (used in 
Hive), this is not equals replace function, have some different rules
   
   Look this to see all rules and examples: [PostgreSQL 
Translate](https://www.w3resource.com/PostgreSQL/translate-function.php)
   
   If use replace for some cases, the result returned will be wrong
   especially if there is repetition in **from_string** and different matches 
in **to_string**




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