[ 
https://issues.apache.org/jira/browse/DRILL-4872?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15459977#comment-15459977
 ] 

Boaz Ben-Zvi commented on DRILL-4872:
-------------------------------------

Likely related - notice the similarity: below is the stack from the current 
code (for the testcase in DRILL-4026) :

Caused by: io.netty.util.IllegalReferenceCountException: refCnt: 0
        at 
io.netty.buffer.AbstractByteBuf.ensureAccessible(AbstractByteBuf.java:1178) 
~[netty-buffer-4.0.27.Final.jar:4.0.27.Final]
        at io.netty.buffer.DrillBuf.checkIndexD(DrillBuf.java:115) 
~[drill-memory-base-1.8.0-SNAPSHOT.jar:4.0.27.Final]
        at io.netty.buffer.DrillBuf.checkBytes(DrillBuf.java:141) 
~[drill-memory-base-1.8.0-SNAPSHOT.jar:4.0.27.Final]
        at 
org.apache.drill.exec.expr.fn.impl.ByteFunctionHelpers.compare(ByteFunctionHelpers.java:99)
 ~[vector-1.8.0-SNAPSHOT.jar:1.8.0-SNAPSHOT]
        at 
org.apache.drill.exec.test.generated.ProjectorGen3.doEval(ProjectorTemplate.java:49)
 ~[na:na]
        at 
org.apache.drill.exec.test.generated.ProjectorGen3.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]
        at 
org.apache.drill.exec.record.AbstractSingleRecordBatch.innerNext(AbstractSingleRecordBatch.java:93)
 ~[drill-java-exec-1.8.0-SNAPSHOT.jar:1.8.0-SNAPSHOT]

> 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
>              Labels: NPE
>             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)

Reply via email to