Uploaded image for project: 'Apache Drill'
  1. Apache Drill
  2. DRILL-4573

Zero copy LIKE, REGEXP_MATCHES, SUBSTR

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • None
    • 1.7.0
    • None
    • None

    Description

      All the functions using the java.util.regex.Matcher are currently creating Java string objects to pass into the matcher.reset().

      However this creates unnecessary copy of the bytes and a Java string object.

      The matcher uses a CharSequence, so instead of making a copy we can create an adapter from the DrillBuffer to the CharSequence interface.

      Gains of 25% in execution speed are possible when going over VARCHAR of 36 chars. The gain will be proportional to the size of the VARCHAR.

      Attachments

        1. DRILL-4573.patch.txt
          19 kB
          jean-claude
        2. DRILL-4573-3.patch.txt
          7 kB
          jean-claude

        Issue Links

          Activity

            People

              Unassigned Unassigned
              jccote jean-claude
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: