[
https://issues.apache.org/jira/browse/SPARK-14545?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15236293#comment-15236293
]
Apache Spark commented on SPARK-14545:
--------------------------------------
User 'dongjoon-hyun' has created a pull request for this issue:
https://github.com/apache/spark/pull/12312
> Improve `LikeSimplification` by adding `a%b` rule
> -------------------------------------------------
>
> Key: SPARK-14545
> URL: https://issues.apache.org/jira/browse/SPARK-14545
> Project: Spark
> Issue Type: New Feature
> Components: Optimizer
> Reporter: Dongjoon Hyun
>
> Current `LikeSimplification` handles the following four rules.
> - 'a%' => expr.StartsWith("a")
> - '%b' => expr.EndsWith("b")
> - '%a%' => expr.Contains("a")
> - 'a' => EqualTo("a")
> This issue adds the following rule.
> - 'a%b' => expr.Length() > 2 && expr.StartsWith("a") && expr.EndsWith("b")
> Here, 2 is statically calculated from "a".size + "b".size.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]