[
https://issues.apache.org/jira/browse/SPARK-19555?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Josh Rosen resolved SPARK-19555.
--------------------------------
Resolution: Fixed
Fix Version/s: 2.1.1
2.2.0
Fixed by SPARK-17647 in Spark 2.1.1 / 2.2.0.
> Improve inefficient StringUtils.escapeLikeRegex() method
> --------------------------------------------------------
>
> Key: SPARK-19555
> URL: https://issues.apache.org/jira/browse/SPARK-19555
> Project: Spark
> Issue Type: Improvement
> Components: SQL
> Affects Versions: 2.0.0
> Reporter: Josh Rosen
> Fix For: 2.2.0, 2.1.1
>
>
> 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:
> https://github.com/apache/spark/blob/d785217b791882e075ad537852d49d78fc1ca31b/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/util/StringUtils.scala#L28
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]