Boaz Ben-Zvi created DRILL-4872:
-----------------------------------
Summary: NPE from CTAS partitioned by a projected casted null
Key: DRILL-4872
URL: https://issues.apache.org/jira/browse/DRILL-4872
Project: Apache Drill
Issue Type: Bug
Components: Functions - Drill
Affects Versions: 1.7.0
Reporter: Boaz Ben-Zvi
Fix For: Future
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
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)