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

Invalid plan for sorted INSERT with an outer join and null checking

    XMLWordPrintableJSON

Details

    • ghx-label-8

    Description

      Kudu DML queries may fail due to an invalid plan in the following circumstances:

      • Query has an outer join that involves an inline view
      • The outer-joined inline view contains NULL-checking expressions like COALESCE()/IFNULL()/CASE and/or constant expressions like literals

      The following error message will appear in the logs.

      Invalid plan. TupleIsNullPredicate has invalid tuple idx.
      

      Further, due to a separate issue, the coordinating impalad may crash (IMPALA-6262).

      This issue is a regression introduced in Impala 2.10 by the recent addition of partial sorting before Kudu DML. See IMPALA-5498.

      Reproduction

      create table ktest (a int primary key, b int) stored as kudu;
      
      upsert into ktest
      select t1.id, v.id from functional.alltypes t1
      left outer join (select ifnull(id, 10) id from functional.alltypessmall) v
      on t1.id = v.id;
      

      Attachments

        Issue Links

          Activity

            People

              twmarshall Thomas Tauber-Marshall
              alex.behm Alexander Behm
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: