Uploaded image for project: 'HPCC'
  1. HPCC
  2. HPCC-13167

Optimize TRIM(x, LEFT, RIGHT)

    Details

    • Type: Improvement
    • Status: Accepted
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Code Generator
    • Labels:

      Description

      Currently TRIM is optimized to only calculate the length of the trimmed string - and not create a clone of the data. It would be possible to do the same for TRIM(x, LEFT) by offsetting the start, and then calculating the trimmed length

      i.e. TRIM(str) could be implemented as (pseudo code):

      prefix = trimLeading(len, str);
      result.length = rtlTrim(len - prefix, str + prefix);
      result.str = str + prefix;
      

      It would be good to check if TRIM(x, RIGHT) is also currently optimized.

        Attachments

          Activity

            People

            • Assignee:
              anybody Available for anyone
              Reporter:
              ghalliday Gavin Halliday
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: