Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-27839

Improve UTF8String.replace() / StringReplace performance

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.4.0
    • 3.0.0
    • SQL
    • None

    Description

      The UTF8String.replace() function and StringReplace expression are missing a few common-case optimizations, such as avoiding copies when the replacement does not change the string and avoiding redundant copying / decoding of the search and replacement strings in case they are constants.

      I think there's room to significantly improve performance here, especially for single-character replacements.

      Attachments

        Issue Links

          Activity

            People

              joshrosen Josh Rosen
              joshrosen Josh Rosen
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: