Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-16343

Improve the PushDownPredicate rule to pushdown predicates currectly in non-deterministic condition

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Critical
    • Resolution: Fixed
    • 1.6.2, 2.0.0
    • 2.0.2, 2.1.0
    • SQL

    Description

      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:

      SELECT a FROM t WHERE rand() < 0.1 AND a = 1
      

      And

      SELECT a FROM t WHERE a = 1 AND rand() < 0.1
      

      may call rand() for different times and therefore the output rows differ.

      Attachments

        Activity

          People

            jiangxb1987 Xingbo Jiang
            jiangxb1987 Xingbo Jiang
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: