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

Prune filter condition if compare with rand is deterministic

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.4.0
    • 3.4.0
    • SQL
    • None

    Description

      The SQL

      SELECT * FROM tab WHERE rand(1) < 2
      

      evaluate rand(1) < 2 for rows one by one.
      In fact, we can prune the filter condition.

      Attachments

        Activity

          People

            beliefer Jiaan Geng
            beliefer Jiaan Geng
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: