Skip to content

Conversation

@zhouyuan
Copy link
Collaborator

@zhouyuan zhouyuan commented Jun 9, 2022

No description provided.

@github-actions
Copy link

github-actions bot commented Jun 9, 2022

Thanks for opening a pull request!

If this is not a minor PR. Could you open an issue for this pull request on JIRA? https://issues.apache.org/jira/browse/ARROW

Opening JIRAs ahead of time contributes to the Openness of the Apache Arrow project.

Then could you also rename pull request title in the following format?

ARROW-${JIRA_ID}: [${COMPONENT}] ${SUMMARY}

or

MINOR: [${COMPONENT}] ${SUMMARY}

See also:

@zhouyuan zhouyuan force-pushed the wip_lpad branch 2 times, most recently from ca0fa06 to c7582cc Compare June 13, 2022 12:37
jpedroantunes and others added 3 commits June 14, 2022 06:52
…ing input values

- LPAD([string] basetext, [number] x, [optional string] padtext)
- RPAD([string] basetext, [number] x, [optional string] padtext)

lpad - Prepends padtext to basetext in a way that allows as many characters as possible from padtext given an output string length of x. When x is less than or equal to the length of basetext, only characters from basetext are printed in the output. If padtext is omitted then spaces are prepended.

rpad - Appends padtext to basetext in a way that allows as many characters as possible from padtext given an output string length of x. When x is less than or equal to the length of basetext, only characters from basetext are printed in the output. If padtext is omitted then spaces are appended.

Closes apache#10173 from jpedroantunes/feature/lpad-rpad-functions and squashes the following commits:

4efc0fe <João Pedro> Add utf8_length method that ignore invalid char considering size 1
33a5a14 <João Pedro> Fix identation on function string registry
4c4b2f4 <João Pedro> Change lpad and rpad functions signature and definition
26b90b0 <João Pedro> Correct ci lint errors on gandiva
66594a0 <João Pedro> Correct lint local errors on gandiva
b6b63e9 <João Pedro> Add projector test for RPAD string function
dc72148 <João Pedro> Add function registry for RPAD string function without pad text
c270fb1 <João Pedro> Add base implementation and tests for RPAD functions
08d2053 <João Pedro> Add function registry for LPAD string function without pad text
585cad3 <João Pedro> Add base implementation and tests for LPAD function without pad texts considering string input values
73927fc <João Pedro> Add projector test for LPAD string function
2c929a9 <João Pedro> Add function registry for LPAD string function
aecaff6 <João Pedro> Add base implementation and tests for LPAD function considering string input values

Authored-by: João Pedro <joaop@simbioseventures.com>
Signed-off-by: Praveen <praveen@dremio.com>
- add max/min return length for space/lpad/rpad udfs
- correct return length

Closes apache#11016 from ZMZ91/bugfix/limit_return_chars_count

Authored-by: ZMZ <zmz@yanhuangdata.com>
Signed-off-by: Pindikura Ravindra <ravindra@dremio.com>
Signed-off-by: Yuan Zhou <yuan.zhou@intel.com>
Signed-off-by: Yuan Zhou <yuan.zhou@intel.com>
@zhouyuan zhouyuan merged commit 2ca3236 into oap-project:arrow-4.0.0-oap Jun 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants