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

Join predicate incorrectly ignored

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: Impala 1.3
    • Fix Version/s: Impala 1.2.4
    • Component/s: None
    • Labels:

      Description

      The results of the query below are wrong. The explain plan shows that one of the join conditions is not included.

      [localhost:21000] > select a.id, a.int_col, b.id from functional.alltypes a join functional.alltypes b on a.id = b.id and a.int_col = b.id limit 10;
      Query: select a.id, a.int_col, b.id from functional.alltypes a join functional.alltypes b on a.id = b.id and a.int_col = b.id limit 10
      +-----+---------+-----+
      | id  | int_col | id  |
      +-----+---------+-----+
      | 900 | 0       | 900 |
      | 901 | 1       | 901 |
      | 902 | 2       | 902 |
      | 903 | 3       | 903 |
      | 904 | 4       | 904 |
      | 905 | 5       | 905 |
      | 906 | 6       | 906 |
      | 907 | 7       | 907 |
      | 908 | 8       | 908 |
      | 909 | 9       | 909 |
      +-----+---------+-----+
      Returned 10 row(s) in 0.95s
      
      
      [localhost:21000] > explain select a.id, a.int_col, b.id from functional.alltypes a join functional.alltypes b on a.id = b.id and a.int_col = b.id limit 10;
      Query: explain select a.id, a.int_col, b.id from functional.alltypes a join functional.alltypes b on a.id = b.id and a.int_col = b.id limit 10
      +-----------------------------------------------------------+
      | Explain String                                            |
      +-----------------------------------------------------------+
      | Estimated Per-Host Requirements: Memory=160.06MB VCores=2 |
      |                                                           |
      | 04:EXCHANGE [PARTITION=UNPARTITIONED]                     |
      | |  limit: 10                                              |
      | |                                                         |
      | 02:HASH JOIN [INNER JOIN, BROADCAST]                      |
      | |  hash predicates: a.id = b.id                           |
      | |  limit: 10                                              |
      | |                                                         |
      | |--03:EXCHANGE [BROADCAST]                                |
      | |  |                                                      |
      | |  01:SCAN HDFS [functional.alltypes b]                   |
      | |     partitions=24/24 size=478.45KB                      |
      | |                                                         |
      | 00:SCAN HDFS [functional.alltypes a]                      |
      |    partitions=24/24 size=478.45KB                         |
      +-----------------------------------------------------------+
      Returned 16 row(s) in 0.02s
      

        Attachments

          Activity

            People

            • Assignee:
              marcelk Marcel Kornacker
              Reporter:
              caseyc casey
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: