You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Apache Spark (JIRA)" <ji...@apache.org> on 2016/04/12 02:09:25 UTC

[jira] [Commented] (SPARK-14545) Improve `LikeSimplification` by adding `a%b` rule

    [ 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: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org