You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@drill.apache.org by "Timothy Chen (JIRA)" <ji...@apache.org> on 2014/05/16 22:08:15 UTC

[jira] [Resolved] (DRILL-282) Support 'repeated' type in Json reader

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

Timothy Chen resolved DRILL-282.
--------------------------------

    Resolution: Fixed

> Support 'repeated' type in Json reader
> --------------------------------------
>
>                 Key: DRILL-282
>                 URL: https://issues.apache.org/jira/browse/DRILL-282
>             Project: Apache Drill
>          Issue Type: Bug
>            Reporter: Mehant Baid
>            Assignee: Timothy Chen
>
> Trying to scan the following json file 
> {
>   "Bigname": [ {"name": "hello", "id": "1"}, {"name": "world", "id": "2"}]
> }
> using a simple query (via sqlline): select * from "filename.json"; results in the following error
> java.lang.IndexOutOfBoundsException
> 	at io.netty.buffer.EmptyByteBuf.checkIndex(EmptyByteBuf.java:857)
> 	at io.netty.buffer.EmptyByteBuf.getBytes(EmptyByteBuf.java:321)
> 	at org.apache.drill.exec.vector.VarCharVector$Accessor.get(VarCharVector.java:241)
> 	at org.apache.drill.exec.vector.VarCharVector$Accessor.getObject(VarCharVector.java:258)
> 	at org.apache.drill.exec.vector.NullableVarCharVector$Accessor.getObject(NullableVarCharVector.java:245)
> 	at org.apache.drill.sql.client.full.JsonHelper.get(JsonHelper.java:41)
> 	at org.apache.drill.sql.client.full.BatchLoaderMap.getCurrentObject(BatchLoaderMap.java:112)
> 	at org.apache.drill.sql.client.full.ResultEnumerator.moveNext(ResultEnumerator.java:51)
> 	at net.hydromatic.optiq.runtime.ObjectEnumeratorCursor.next(ObjectEnumeratorCursor.java:44)
> 	at net.hydromatic.optiq.jdbc.OptiqResultSet.next(OptiqResultSet.java:162)
> 	at sqlline.SqlLine$BufferedRows.<init>(SqlLine.java:2499)
> 	at sqlline.SqlLine.print(SqlLine.java:1886)
> 	at sqlline.SqlLine$Commands.execute(SqlLine.java:3835)
> 	at sqlline.SqlLine$Commands.sql(SqlLine.java:3738)
> 	at sqlline.SqlLine.dispatch(SqlLine.java:882)
> 	at sqlline.SqlLine.begin(SqlLine.java:717)
> 	at sqlline.SqlLine.mainWithInputRedirection(SqlLine.java:460)
> 	at sqlline.SqlLine.main(SqlLine.java:443)
> The same query works if the above json file is modified to be the following:
> {
>   "Bigname": [ {"name": "hello", "id": "1"} ]
> }



--
This message was sent by Atlassian JIRA
(v6.2#6252)