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

LIMIT should apply to the total result set after UNION

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Duplicate
    • Affects Version/s: Impala 2.0
    • Fix Version/s: None
    • Component/s: 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

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

                Dates

                • Created:
                  Updated:
                  Resolved: