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

NPE from CTAS partitioned by a projected casted null

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.7.0
    • Fix Version/s: 1.10.0
    • Component/s: Functions - Drill
    • Labels:

      Description

      Extracted from DRILL-3898 : Running the same test case on a smaller table ( store_sales.dat from TPCDS SF 1) has no space issues, but there is a Null Pointer Exception from the projection:

      Caused by: java.lang.NullPointerException: null
      at org.apache.drill.exec.expr.fn.impl.ByteFunctionHelpers.compare(ByteFunctionHelpers.java:100) ~[vector-1.8.0-SNAPSHOT.jar:1.8.0-SNAPSHOT]
      at org.apache.drill.exec.test.generated.ProjectorGen1.doEval(ProjectorTemplate.java:49) ~[na:na]
      at org.apache.drill.exec.test.generated.ProjectorGen1.projectRecords(ProjectorTemplate.java:62) ~[na:na]
      at org.apache.drill.exec.physical.impl.project.ProjectRecordBatch.doWork(ProjectRecordBatch.java:199) ~[drill-java-exec-1.8.0-SNAPSHOT.jar:1.8.0-SNAPSHOT]

      A simplified version of the test case:

      0: jdbc:drill:zk=local> create table dfs.tmp.ttt partition by ( x ) as select case when columns[8] = '' then cast(null as varchar(10)) else cast(columns[8] as varchar(10)) end as x FROM dfs.`/Users/boazben-zvi/data/store_sales/store_sales.dat`;
      Error: SYSTEM ERROR: NullPointerException

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                arina Arina Ielchiieva
                Reporter:
                ben-zvi Boaz Ben-Zvi
                Reviewer:
                Khurram Faraaz
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: