Uploaded image for project: 'IMPALA'
  1. IMPALA
  2. IMPALA-1379

LIMIT should apply to the total result set after UNION

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Duplicate
    • Impala 2.0
    • None
    • Frontend

    Description

      The query below produces only 1 row in both Postgresql and Mysql

      Query: select int_col from alltypestiny union all select int_col from alltypestiny limit 1
      +---------+
      | int_col |
      +---------+
      | 0       |
      | 1       |
      | 0       |
      | 1       |
      | 0       |
      | 0       |
      | 1       |
      | 0       |
      | 1       |
      +---------+
      Fetched 9 row(s) in 0.46s
      

      Impala applies the LIMIT to the bottom query in the UNION instead of the overall query result.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              caseyc casey
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: