Uploaded image for project: 'Apache Drill'
  1. Apache Drill
  2. DRILL-5395

Query on MapR-DB table fails with NPE due to an issue with assignment logic

    Details

      Description

      We uncovered this issue when working on DRILL-5394.

      The MapR-DB table in question had 5 tablets with skewed data distribution (~6 million rows). A partial WIP fix for DRILL-5394 caused the number of rows to be reported incorrectly (~300,000). 2 minor fragments were created (due to filter selectivity) for scanning the 5 tablets. And this resulted in an NPE, possibly related to an issue with assignment logic, that was now exposed.

      Representative query:

      SELECT Convert_from(avail.customer, 'UTF8') AS ABC, 
             Convert_from(prop.customer, 'UTF8')  AS PQR 
      FROM   (SELECT Convert_from(a.row_key, 'UTF8') 
                     AS customer, 
                     Cast(Convert_from(a.data .` l_discount ` , 'double_be') AS FLOAT) 
                     AS availability 
              FROM   db.tpch_maprdb.lineitem_1 a 
              WHERE  Convert_from(a.row_key, 'UTF8') = '%004%') AS avail 
             join 
                    (SELECT Convert_from(b.row_key, 'UTF8') 
                            AS customer, 
                     Cast( 
             Convert_from(b.data .` l_discount ` , 'double_be') AS FLOAT) AS 
                     availability 
              FROM   db.tpch_maprdb.lineitem_1 b 
              WHERE  Convert_from(b.row_key, 'UTF8') LIKE '%003%') AS prop 
               ON avail.customer = prop.customer; 
      

      Error:

      org.apache.drill.common.exceptions.UserException: SYSTEM ERROR: NullPointerException
      

      Log attached.

        Attachments

        1. drillbit.log.txt
          6 kB
          Abhishek Girish

          Issue Links

            Activity

              People

              • Assignee:
                ppenumarthy Padma Penumarthy
                Reporter:
                agirish Abhishek Girish
                Reviewer:
                Chunhui Shi
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: