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

Incorrect result due to constant evaluation in query with outer join

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: Impala 2.5.0
    • Fix Version/s: None
    • Component/s: Frontend

      Description

      Please see below

      [localhost.localdomain:21000] > explain SELECT 1
      FROM alltypestiny a1
      INNER JOIN alltypesagg a2 ON a1.smallint_col = a2.year AND false
      RIGHT JOIN alltypes a3 ON a1.year = a1.bigint_col;
      Query: explain SELECT 1
      FROM alltypestiny a1
      INNER JOIN alltypesagg a2 ON a1.smallint_col = a2.year AND false
      RIGHT JOIN alltypes a3 ON a1.year = a1.bigint_col
      +---------------------------------------------------------+
      | Explain String                                          |
      +---------------------------------------------------------+
      | Estimated Per-Host Requirements: Memory=1.00KB VCores=1 |
      |                                                         |
      | 00:EMPTYSET                                             |
      +---------------------------------------------------------+
      Fetched 3 row(s) in 0.00s
      
      [localhost.localdomain:21000] > SELECT 1
      FROM alltypestiny a1
      INNER JOIN alltypesagg a2 ON a1.smallint_col = a2.year AND false
      RIGHT JOIN alltypes a3 ON a1.year = a1.bigint_col;
      Query: select 1
      FROM alltypestiny a1
      INNER JOIN alltypesagg a2 ON a1.smallint_col = a2.year AND false
      RIGHT JOIN alltypes a3 ON a1.year = a1.bigint_col
      
      Fetched 0 row(s) in 0.00s
      

      Since the query uses a RIGHT JOIN the result have the same number of rows as the a3 table.

      Version: 1920aa5ea214ea21917778d5faad3ef1cb3e9f87

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                caseyc casey
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated: