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

Impalad crashes when left joining inline view that has aggregate using distinct

    XMLWordPrintableJSON

    Details

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

      Description

      I only tried this on the latest master, 542a4d93d6aa18fe35afa49f8fa1d2044d079ebd

      The query below causes impalad to crash. The important parto of the query seems to be the "COUNT(DISTINCT)" in the inline view and the "LEFT JOIN".

      [localhost:21000] > select 1 FROM alltypes AS t1 LEFT JOIN ( SELECT COUNT(1) AS int_col_1, COUNT(DISTINCT 2) FROM alltypesagg) AS t2 ON t2.int_col_1 = t1.int_col;
      Query: select 1 FROM alltypes AS t1 LEFT JOIN ( SELECT COUNT(1) AS int_col_1, COUNT(DISTINCT 2) FROM alltypesagg) AS t2 ON t2.int_col_1 = t1.int_col
      Error communicating with impalad: TSocket read 0 bytes
      

      impalad log:

      I0319 12:12:00.284919  3390 plan-fragment-executor.cc:170] descriptor table for fragment=7e4c3337bf1d2948:7c2073b9cba8f690
      tuples:
      Tuple(id=0 size=8 slots=[Slot(id=6 type=INT col=6 offset=4 null=(offset=0 mask=1) slot_idx=0 field_idx=-1)])
      Tuple(id=1 size=0 slots=[])
      Tuple(id=2 size=16 slots=[Slot(id=0 type=TINYINT col=-1 offset=1 null=(offset=0 mask=1) slot_idx=0 field_idx=-1), Slot(id=1 type=BIGINT col=-1 offset=8 null=(offset=0 mask=0) slot_idx=1 field_idx=-1)])
      Tuple(id=3 size=16 slots=[Slot(id=2 type=BIGINT col=-1 offset=-1 null=(offset=0 mask=1) slot_idx=0 field_idx=-1), Slot(id=3 type=BIGINT col=-1 offset=8 null=(offset=0 mask=1) slot_idx=0 field_idx=-1)])
      F0319 12:12:00.286687  3390 tuple-is-null-predicate.cc:50] Check failed: row_desc.TupleIsNullable(tuple_idx) 
      

      queries that work:

      [localhost:21000] > select 1 FROM alltypes AS t1 JOIN ( SELECT COUNT(1) AS int_col_1, COUNT(DISTINCT 2) FROM alltypesagg) AS t2 ON t2.int_col_1 = t1.int_col;
      Query: select 1 FROM alltypes AS t1 JOIN ( SELECT COUNT(1) AS int_col_1, COUNT(DISTINCT 2) FROM alltypesagg) AS t2 ON t2.int_col_1 = t1.int_col
      
      Returned 0 row(s) in 0.71s
      
      
      [localhost:21000] > select 1 FROM alltypes AS t1 LEFT JOIN ( SELECT COUNT(1) AS int_col_1, COUNT(2) FROM alltypesagg) AS t2 ON t2.int_col_1 = t1.int_col limit 3;
      Query: select 1 FROM alltypes AS t1 LEFT JOIN ( SELECT COUNT(1) AS int_col_1, COUNT(2) FROM alltypesagg) AS t2 ON t2.int_col_1 = t1.int_col limit 3
      +---+
      | 1 |
      +---+
      | 1 |
      | 1 |
      | 1 |
      +---+
      Returned 3 row(s) in 0.43s
      

        Attachments

          Activity

            People

            • Assignee:
              alex.behm Alexander Behm
              Reporter:
              caseyc casey
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: