You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@drill.apache.org by "Jason Altekruse (JIRA)" <ji...@apache.org> on 2016/02/03 02:29:40 UTC

[jira] [Resolved] (DRILL-4032) Drill unable to parse json files with schema changes

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

Jason Altekruse resolved DRILL-4032.
------------------------------------
       Resolution: Fixed
    Fix Version/s: 1.4.0

> Drill unable to parse json files with schema changes
> ----------------------------------------------------
>
>                 Key: DRILL-4032
>                 URL: https://issues.apache.org/jira/browse/DRILL-4032
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Execution - Data Types, Storage - JSON
>    Affects Versions: 1.3.0
>            Reporter: Rahul Challapalli
>            Assignee: Steven Phillips
>            Priority: Blocker
>             Fix For: 1.4.0
>
>
> git.commit.id.abbrev=bb69f22
> {code}
> select d.col2.col3  from reg1 d;
> Error: DATA_READ ERROR: Error parsing JSON - index: 0, length: 4 (expected: range(0, 0))
> File  /drill/testdata/reg1/a.json
> Record  2
> Fragment 0:0
> {code}
> The folder reg1 contains 2 files
> File 1 : a.json
> {code}
> {"col1": "val1","col2": null}
> {"col1": "val1","col2": {"col3":"abc", "col4":"xyz"}}
> {code}
> File 2 : b.json
> {code}
> {"col1": "val1","col2": null}
> {"col1": "val1","col2": null}
> {code}
> Exception from the log file :
> {code}
> [Error Id: a7e3c716-838d-4f8f-9361-3727b98f04cd ]
>         at org.apache.drill.common.exceptions.UserException$Builder.build(UserException.java:534) ~[drill-common-1.3.0-SNAPSHOT.jar:1.3.0-SNAPSHOT]
>         at org.apache.drill.exec.store.easy.json.JSONRecordReader.handleAndRaise(JSONRecordReader.java:165) [drill-java-exec-1.3.0-SNAPSHOT.jar:1.3.0-SNAPSHOT]
>         at org.apache.drill.exec.store.easy.json.JSONRecordReader.next(JSONRecordReader.java:205) [drill-java-exec-1.3.0-SNAPSHOT.jar:1.3.0-SNAPSHOT]
>         at org.apache.drill.exec.physical.impl.ScanBatch.next(ScanBatch.java:183) [drill-java-exec-1.3.0-SNAPSHOT.jar:1.3.0-SNAPSHOT]
>         at org.apache.drill.exec.physical.impl.validate.IteratorValidatorBatchIterator.next(IteratorValidatorBatchIterator.java:119) [drill-java-exec-1.3.0-SNAPSHOT.jar:1.3.0-SNAPSHOT]
>         at org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:113) [drill-java-exec-1.3.0-SNAPSHOT.jar:1.3.0-SNAPSHOT]
>         at org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:103) [drill-java-exec-1.3.0-SNAPSHOT.jar:1.3.0-SNAPSHOT]
>         at org.apache.drill.exec.record.AbstractSingleRecordBatch.innerNext(AbstractSingleRecordBatch.java:51) [drill-java-exec-1.3.0-SNAPSHOT.jar:1.3.0-SNAPSHOT]
>         at org.apache.drill.exec.physical.impl.project.ProjectRecordBatch.innerNext(ProjectRecordBatch.java:130) [drill-java-exec-1.3.0-SNAPSHOT.jar:1.3.0-SNAPSHOT]
>         at org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:156) [drill-java-exec-1.3.0-SNAPSHOT.jar:1.3.0-SNAPSHOT]
>         at org.apache.drill.exec.physical.impl.validate.IteratorValidatorBatchIterator.next(IteratorValidatorBatchIterator.java:119) [drill-java-exec-1.3.0-SNAPSHOT.jar:1.3.0-SNAPSHOT]
>         at org.apache.drill.exec.physical.impl.BaseRootExec.next(BaseRootExec.java:104) [drill-java-exec-1.3.0-SNAPSHOT.jar:1.3.0-SNAPSHOT]
>         at org.apache.drill.exec.physical.impl.ScreenCreator$ScreenRoot.innerNext(ScreenCreator.java:80) [drill-java-exec-1.3.0-SNAPSHOT.jar:1.3.0-SNAPSHOT]
>         at org.apache.drill.exec.physical.impl.BaseRootExec.next(BaseRootExec.java:94) [drill-java-exec-1.3.0-SNAPSHOT.jar:1.3.0-SNAPSHOT]
>         at org.apache.drill.exec.work.fragment.FragmentExecutor$1.run(FragmentExecutor.java:256) [drill-java-exec-1.3.0-SNAPSHOT.jar:1.3.0-SNAPSHOT]
>         at org.apache.drill.exec.work.fragment.FragmentExecutor$1.run(FragmentExecutor.java:250) [drill-java-exec-1.3.0-SNAPSHOT.jar:1.3.0-SNAPSHOT]
>         at java.security.AccessController.doPrivileged(Native Method) [na:1.7.0_71]
>         at javax.security.auth.Subject.doAs(Subject.java:415) [na:1.7.0_71]
>         at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1595) [hadoop-common-2.7.0-mapr-1506.jar:na]
>         at org.apache.drill.exec.work.fragment.FragmentExecutor.run(FragmentExecutor.java:250) [drill-java-exec-1.3.0-SNAPSHOT.jar:1.3.0-SNAPSHOT]
>         at org.apache.drill.common.SelfCleaningRunnable.run(SelfCleaningRunnable.java:38) [drill-common-1.3.0-SNAPSHOT.jar:1.3.0-SNAPSHOT]
>         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [na:1.7.0_71]
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.7.0_71]
>         at java.lang.Thread.run(Thread.java:745) [na:1.7.0_71]
> Caused by: java.lang.IndexOutOfBoundsException: index: 0, length: 4 (expected: range(0, 0))
>         at io.netty.buffer.DrillBuf.checkIndexD(DrillBuf.java:189) ~[drill-java-exec-1.3.0-SNAPSHOT.jar:4.0.27.Final]
>         at io.netty.buffer.DrillBuf.chk(DrillBuf.java:211) ~[drill-java-exec-1.3.0-SNAPSHOT.jar:4.0.27.Final]
>         at io.netty.buffer.DrillBuf.getInt(DrillBuf.java:491) ~[drill-java-exec-1.3.0-SNAPSHOT.jar:4.0.27.Final]
>         at org.apache.drill.exec.vector.UInt4Vector$Accessor.get(UInt4Vector.java:364) ~[drill-java-exec-1.3.0-SNAPSHOT.jar:1.3.0-SNAPSHOT]
>         at org.apache.drill.exec.vector.VarCharVector$Mutator.setSafe(VarCharVector.java:525) ~[drill-java-exec-1.3.0-SNAPSHOT.jar:1.3.0-SNAPSHOT]
>         at org.apache.drill.exec.vector.NullableVarCharVector$Mutator.fillEmpties(NullableVarCharVector.java:465) ~[drill-java-exec-1.3.0-SNAPSHOT.jar:1.3.0-SNAPSHOT]
>         at org.apache.drill.exec.vector.NullableVarCharVector$Mutator.setSafe(NullableVarCharVector.java:545) ~[drill-java-exec-1.3.0-SNAPSHOT.jar:1.3.0-SNAPSHOT]
>         at org.apache.drill.exec.vector.complex.impl.NullableVarCharWriterImpl.writeVarChar(NullableVarCharWriterImpl.java:151) ~[drill-java-exec-1.3.0-SNAPSHOT.jar:1.3.0-SNAPSHOT]
>         at org.apache.drill.exec.vector.complex.fn.JsonReader.handleString(JsonReader.java:461) ~[drill-java-exec-1.3.0-SNAPSHOT.jar:1.3.0-SNAPSHOT]
>         at org.apache.drill.exec.vector.complex.fn.JsonReader.writeData(JsonReader.java:342) ~[drill-java-exec-1.3.0-SNAPSHOT.jar:1.3.0-SNAPSHOT]
>         at org.apache.drill.exec.vector.complex.fn.JsonReader.writeData(JsonReader.java:310) ~[drill-java-exec-1.3.0-SNAPSHOT.jar:1.3.0-SNAPSHOT]
>         at org.apache.drill.exec.vector.complex.fn.JsonReader.writeDataSwitch(JsonReader.java:241) ~[drill-java-exec-1.3.0-SNAPSHOT.jar:1.3.0-SNAPSHOT]
>         at org.apache.drill.exec.vector.complex.fn.JsonReader.writeToVector(JsonReader.java:179) ~[drill-java-exec-1.3.0-SNAPSHOT.jar:1.3.0-SNAPSHOT]
>         at org.apache.drill.exec.vector.complex.fn.JsonReader.write(JsonReader.java:145) ~[drill-java-exec-1.3.0-SNAPSHOT.jar:1.3.0-SNAPSHOT]
>         at org.apache.drill.exec.store.easy.json.JSONRecordReader.next(JSONRecordReader.java:183) [drill-java-exec-1.3.0-SNAPSHOT.jar:1.3.0-SNAPSHOT]
> {code}



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