zhang-jianq opened a new issue, #13458:
URL: https://github.com/apache/gluten/issues/13458

   ### Description
   
   ## Motivation
   
   Flink's `REPLACE`, `RIGHT` and `FROM_BASE64` are core string expressions. 
Today gluten-flink does not map them, so any Calc projecting them fails 
function offload ("Function not supported") and stays on the native path.
   
   ## Proposal
   
   Offload them to the velox flinksql function set:
   
   - velox side (companion PR): Flink-semantics implementations under 
`velox/functions/flinksql/`:
     - `replace(string, from, to) -> string` — uses 
`stringCore::replace<false>` (empty `from` inserts `to` around every character, 
matching Flink's `String.replace`; not Spark's `ignoreEmptyReplaced=true`).
     - `right(string, n) -> string` — the rightmost `n` UTF-8 code points; `n 
<= 0` returns the empty string, `n` at or beyond the length returns the whole 
string.
     - `from_base64(string) -> string` — base64-decodes to `STRING` (not 
VARBINARY, so prestosql's `FromBase64Function` is not reused).
   - planner side (this repo): `REPLACE -> "replace"`, `RIGHT -> "right"`, 
`FROM_BASE64 -> "from_base64"` name mappings via `DefaultRexCallConverter` 
(one-line passthrough; no dedicated converter needed).
   
   Semantics to preserve: right's UTF-8 code-point counting and non-positive 
`n`, replace's empty-old handling and null propagation, from_base64's STRING 
return type and decode-error behavior.
   
   Gluten version: main branch
   
   ### Gluten version
   
   main branch


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