You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@asterixdb.apache.org by "Janhavi Tripurwar (Jira)" <ji...@apache.org> on 2025/05/30 11:33:00 UTC
[jira] [Created] (ASTERIXDB-3615) Implement LPAD and RPAD Function
Janhavi Tripurwar created ASTERIXDB-3615:
--------------------------------------------
Summary: Implement LPAD and RPAD Function
Key: ASTERIXDB-3615
URL: https://issues.apache.org/jira/browse/ASTERIXDB-3615
Project: Apache AsterixDB
Issue Type: Task
Components: COMP - Compiler, FUN - Functions, RT - Runtime
Reporter: Janhavi Tripurwar
Add *{{LPAD(input_str, length, pad_str)}}* and *{{RPAD(input, length, pad_str)}}* string functions to support left and right padding up to a target length. Functions must handle Unicode characters correctly.
{code:java}
lpad('asterix', 11, '$&^') → $&^$asterix
lpad('👩👩👧', 2, '$') → 👩
lpad('👩👩👧', 10, '👩👩👧👦') → 👩👩👩👩👧
lpad(null, 4, '%%') → null{code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)