You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "Chris Westin (JIRA)" <ji...@apache.org> on 2015/04/01 16:50:54 UTC

[jira] [Assigned] (DRILL-2647) NullPointerException from CONVERT_FROM given a NULL

     [ https://issues.apache.org/jira/browse/DRILL-2647?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Chris Westin reassigned DRILL-2647:
-----------------------------------

    Assignee: Chris Westin

> NullPointerException from CONVERT_FROM given a NULL
> ---------------------------------------------------
>
>                 Key: DRILL-2647
>                 URL: https://issues.apache.org/jira/browse/DRILL-2647
>             Project: Apache Drill
>          Issue Type: Bug
>            Reporter: Daniel Barclay (Drill)
>            Assignee: Chris Westin
>             Fix For: 0.9.0
>
>
> CONVERT_FROM crashes when given a null value like this:
> SELECT CONVERT_FROM(CAST(NULL AS VARCHAR), 'JSON') FROM  INFORMATION_SCHEMA.CATALOGS;
> This fails similarly
> SELECT CONVERT_FROM(CAST(NULL AS INTEGER), 'JSON') FROM  INFORMATION_SCHEMA.CATALOGS;
> ------------------------------------------------------------------------------------------
> 0: jdbc:drill:zk=local> SELECT CONVERT_FROM(CAST(NULL AS VARCHAR), 'JSON') FROM  INFORMATION_SCHEMA.CATALOGS;
> Exception in thread "2ae48af0-c497-8b98-d9eb-f64353f79065:frag:0:0" java.lang.RuntimeException: Error closing fragment context.
> 	at org.apache.drill.exec.work.fragment.FragmentExecutor.closeOutResources(FragmentExecutor.java:224)
> 	at org.apache.drill.exec.work.fragment.FragmentExecutor.run(FragmentExecutor.java:187)
> 	at org.apache.drill.common.SelfCleaningRunnable.run(SelfCleaningRunnable.java:38)
> 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
> 	at java.lang.Thread.run(Thread.java:745)
> Caused by: org.apache.drill.common.exceptions.DrillRuntimeException: Error while converting from JSON. 
> 	at org.apache.drill.exec.test.generated.ProjectorGen4.doEval(ProjectorTemplate.java:38)
> Query failed: RemoteRpcException: Failure while running fragment., Error while converting from JSON.  [ f0c043d2-f86f-4e4d-a864-74df93f6c79f on dev-linux2:31010 ]
> [ f0c043d2-f86f-4e4d-a864-74df93f6c79f on dev-linux2:31010 ]
> 	at org.apache.drill.exec.test.generated.ProjectorGen4.projectRecords(ProjectorTemplate.java:62)
> 	at org.apache.drill.exec.physical.impl.project.ProjectRecordBatch.doWork(ProjectRecordBatch.java:174)
> 	at org.apache.drill.exec.record.AbstractSingleRecordBatch.innerNext(AbstractSingleRecordBatch.java:93)
> 	at org.apache.drill.exec.physical.impl.project.ProjectRecordBatch.innerNext(ProjectRecordBatch.java:134)
> 	at org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:142)
> 	at org.apache.drill.exec.physical.impl.validate.IteratorValidatorBatchIterator.next(IteratorValidatorBatchIterator.java:118)
> 	at org.apache.drill.exec.physical.impl.BaseRootExec.next(BaseRootExec.java:68)
> 	at org.apache.drill.exec.physical.impl.ScreenCreator$ScreenRoot.innerNext(ScreenCreator.java:96)
> 	at org.apache.drill.exec.physical.impl.BaseRootExec.next(BaseRootExec.java:58)
> 	at org.apache.drill.exec.work.fragment.FragmentExecutor.run(FragmentExecutor.java:163)
> 	... 4 more
> Caused by: java.lang.NullPointerException
> 	at org.apache.drill.exec.vector.complex.fn.DrillBufInputStream.getStream(DrillBufInputStream.java:56)
> 	at org.apache.drill.exec.vector.complex.fn.JsonReader.setSource(JsonReader.java:114)
> 	at org.apache.drill.exec.test.generated.ProjectorGen4.doEval(ProjectorTemplate.java:34)
> 	... 14 more
> Error: exception while executing query: Failure while executing query. (state=,code=0)
> 0: jdbc:drill:zk=local> 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)