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 2019/04/30 10:32:00 UTC

[jira] [Assigned] (SPARK-27604) Enhance constant and constraint propagation

     [ https://issues.apache.org/jira/browse/SPARK-27604?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Apache Spark reassigned SPARK-27604:
------------------------------------

    Assignee:     (was: Apache Spark)

> Enhance constant and constraint propagation
> -------------------------------------------
>
>                 Key: SPARK-27604
>                 URL: https://issues.apache.org/jira/browse/SPARK-27604
>             Project: Spark
>          Issue Type: Improvement
>          Components: SQL
>    Affects Versions: 3.0.0
>            Reporter: Peter Toth
>            Priority: Major
>
> There is some room for improvement in terms of how we can use constraints to simplify expressions and maybe what new expressions we can infer.
> Here are some examples what the current implementation can do in terms of expression simplification:
> {code:java}
> SELECT * FROM table WHERE i = 5 AND j = i + 3      =>  SELECT * FROM table WHERE i = 5 AND j = 8
> {code}
> And here are some that it could with some improvement:
> {code:java}
> SELECT * FROM table WHERE i <= 5 AND i = 5         =>  SELECT * FROM table WHERE i = 5
> SELECT * FROM table WHERE i < j AND ... AND i = j  =>  SELECT * FROM table WHERE false{code}
> I also think that `ConstantPropagation` and `InferFiltersFromConstraints` functionality somewhat overlaps and with some refactoring we could come up with a better solution.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org