You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Josh Rosen (JIRA)" <ji...@apache.org> on 2016/09/29 18:34:20 UTC

[jira] [Commented] (SPARK-16343) Improve the PushDownPredicate rule to pushdown predicates currectly in non-deterministic condition

    [ https://issues.apache.org/jira/browse/SPARK-16343?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15533632#comment-15533632 ] 

Josh Rosen commented on SPARK-16343:
------------------------------------

This is actually a correctness issue, albeit pretty minor since I think this can only be witnessed by disabling optimizer rules.

> Improve the PushDownPredicate rule to pushdown predicates currectly in non-deterministic condition
> --------------------------------------------------------------------------------------------------
>
>                 Key: SPARK-16343
>                 URL: https://issues.apache.org/jira/browse/SPARK-16343
>             Project: Spark
>          Issue Type: Improvement
>          Components: SQL
>    Affects Versions: 1.6.2, 2.0.0
>            Reporter: Jiang Xingbo
>            Assignee: Jiang Xingbo
>            Priority: Critical
>              Labels: correctness
>             Fix For: 2.1.0
>
>
> Currently our Optimizer may reorder the predicates to run them more efficient, but in non-deterministic condition, change the order between deterministic parts and non-deterministic parts may change the number of input rows. For example:
> {code:sql}
> SELECT a FROM t WHERE rand() < 0.1 AND a = 1
> {code}
> And
> {code:sql}
> SELECT a FROM t WHERE a = 1 AND rand() < 0.1
> {code}
> may call rand() for different times and therefore the output rows differ.



--
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