Commits


João Pedro authored and Praveen committed 0477cfcddf4
ARROW-12567: [C++][Gandiva] Implement LPAD and RPAD functions for string input values #### Implement LPAD and RPAD functions for string input values. - LPAD([string] basetext, [number] x, [optional string] padtext) - RPAD([string] basetext, [number] x, [optional string] padtext) #### Description 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 #10173 from jpedroantunes/feature/lpad-rpad-functions and squashes the following commits: 4efc0fe8c <João Pedro> Add utf8_length method that ignore invalid char considering size 1 33a5a1478 <João Pedro> Fix identation on function string registry 4c4b2f490 <João Pedro> Change lpad and rpad functions signature and definition 26b90b09e <João Pedro> Correct ci lint errors on gandiva 66594a0af <João Pedro> Correct lint local errors on gandiva b6b63e9d3 <João Pedro> Add projector test for RPAD string function dc72148d6 <João Pedro> Add function registry for RPAD string function without pad text c270fb1ec <João Pedro> Add base implementation and tests for RPAD functions 08d205323 <João Pedro> Add function registry for LPAD string function without pad text 585cad384 <João Pedro> Add base implementation and tests for LPAD function without pad texts considering string input values 73927fc61 <João Pedro> Add projector test for LPAD string function 2c929a98a <João Pedro> Add function registry for LPAD string function aecaff643 <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>