Uploaded image for project: 'Apache Arrow'
  1. Apache Arrow
  2. ARROW-12567

[C++][Gandiva] Implement LPAD and RPAD functions for string input values

    XMLWordPrintableJSON

Details

    Description

      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)

      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.

      Attachments

        Activity

          People

            jpedroantunes João Pedro Antunes Ferreira
            jpedroantunes João Pedro Antunes Ferreira
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 5h
                5h