spark-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Josh Rosen (JIRA)" <>
Subject [jira] [Created] (SPARK-19555) Improve inefficient StringUtils.escapeLikeRegex() method
Date Fri, 10 Feb 2017 22:48:41 GMT
Josh Rosen created SPARK-19555:

             Summary: Improve inefficient StringUtils.escapeLikeRegex() method
                 Key: SPARK-19555
             Project: Spark
          Issue Type: Improvement
          Components: SQL
    Affects Versions: 2.0.0
            Reporter: Josh Rosen

Spark's StringUtils.escapeLikeRegex() method is written inefficiently, performing tons of
object allocations due to the use zip(), flatMap() , and mkString. Instead, I think method
should be rewritten in an imperative style using a Java string builder.

This method can become a performance bottleneck in cases where regex expressions are used
with non-constant-foldable expressions (e.g. the regex expression comes from the data rather
than being part of the query).

Here's the code in question:

This message was sent by Atlassian JIRA

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message