You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "Jason Altekruse (JIRA)" <ji...@apache.org> on 2015/01/28 03:36:34 UTC

[jira] [Commented] (DRILL-2013) Flatten has issues when a filter condition fails for all the records

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

Jason Altekruse commented on DRILL-2013:
----------------------------------------

Thanks for the patch [~dragoncurve]! We are trying to encourage new test cases to include checking the query results using the new test framework. Could you please add a baseline check to your query using the framework? For examples of how to use it please see the TestFrameworkTest class.

Unfortunately we haven't updated many of the tests, which just run a query to confirm that a previous error doesn't occur. This leaves a lot of bad examples of test cases scattered around the codebase.

> Flatten has issues when a filter condition fails for all the records
> --------------------------------------------------------------------
>
>                 Key: DRILL-2013
>                 URL: https://issues.apache.org/jira/browse/DRILL-2013
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Execution - Operators
>            Reporter: Rahul Challapalli
>            Assignee: Jason Altekruse
>            Priority: Critical
>             Fix For: 0.8.0
>
>         Attachments: DRILL-2013.1.patch.txt
>
>
> git.commit.id.abbrev=b491cdb
> When the filter condition fails for all the records and we use flatten in the query, then drill fails. i have tried this with more than one record
> Data Set :
> {code}
> {
>   "id" : "01",
>   "id1" : 1,
>   "list" : [
>     {"col1":"0001","name":"nn001"},
>     {"col2":"0002","name":"nn02"}
>   ]
> }
> {code}
> Below query fails :
> {code}
> 0: jdbc:drill:schema=dfs.drillTestDir> select s.id, s.id1, flatten(s.list) fl from `sample.json` s where s.id='02';
> Query failed: Query failed: Failure while running fragment., index: -4, length: 4 (expected: range(0, 16384)) [ d2b028fe-2c0c-4652-be61-a93f08862883 on qa-node190.qa.lab:31010 ]
> [ d2b028fe-2c0c-4652-be61-a93f08862883 on qa-node190.qa.lab:31010 ]
> {code}
> Below is the error from the logs :
> {code}
> java.lang.IndexOutOfBoundsException: index: -4, length: 4 (expected: range(0, 16384))
>         at io.netty.buffer.DrillBuf.checkIndexD(DrillBuf.java:156) ~[drill-java-exec-0.8.0-SNAPSHOT-rebuffed.jar:4.0.24.Final]
>         at io.netty.buffer.DrillBuf.chk(DrillBuf.java:178) ~[drill-java-exec-0.8.0-SNAPSHOT-rebuffed.jar:4.0.24.Final]
>         at io.netty.buffer.DrillBuf.getInt(DrillBuf.java:447) ~[drill-java-exec-0.8.0-SNAPSHOT-rebuffed.jar:4.0.24.Final]
>         at org.apache.drill.exec.vector.UInt4Vector$Accessor.get(UInt4Vector.java:297) ~[drill-java-exec-0.8.0-SNAPSHOT-rebuffed.jar:0.8.0-SNAPSHOT]
>         at org.apache.drill.exec.vector.complex.RepeatedMapVector$RepeatedMapAccessor.getValueCount(RepeatedMapVector.java:527) ~[drill-java-exec-0.8.0-SNAPSHOT-rebuffed.jar:0.8.0-SNAPSHOT]
>         at org.apache.drill.exec.physical.impl.flatten.FlattenRecordBatch.doWork(FlattenRecordBatch.java:155) ~[drill-java-exec-0.8.0-SNAPSHOT-rebuffed.jar:0.8.0-SNAPSHOT]
>         at org.apache.drill.exec.record.AbstractSingleRecordBatch.innerNext(AbstractSingleRecordBatch.java:93) ~[drill-java-exec-0.8.0-SNAPSHOT-rebuffed.jar:0.8.0-SNAPSHOT]
>         at org.apache.drill.exec.physical.impl.flatten.FlattenRecordBatch.innerNext(FlattenRecordBatch.java:122) ~[drill-java-exec-0.8.0-SNAPSHOT-rebuffed.jar:0.8.0-SNAPSHOT]
>         at org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:142) ~[drill-java-exec-0.8.0-SNAPSHOT-rebuffed.jar:0.8.0-SNAPSHOT]
>         at org.apache.drill.exec.physical.impl.validate.IteratorValidatorBatchIterator.next(IteratorValidatorBatchIterator.java:118) ~[drill-java-exec-0.8.0-SNAPSHOT-rebuffed.jar:0.8.0-SNAPSHOT]
>         at org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:99) ~[drill-java-exec-0.8.0-SNAPSHOT-rebuffed.jar:0.8.0-SNAPSHOT]
>         at org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:89) ~[drill-java-exec-0.8.0-SNAPSHOT-rebuffed.jar:0.8.0-SNAPSHOT]
>         at org.apache.drill.exec.record.AbstractSingleRecordBatch.innerNext(AbstractSingleRecordBatch.java:51) ~[drill-java-exec-0.8.0-SNAPSHOT-rebuffed.jar:0.8.0-SNAPSHOT]
>         at org.apache.drill.exec.physical.impl.project.ProjectRecordBatch.innerNext(ProjectRecordBatch.java:132) ~[drill-java-exec-0.8.0-SNAPSHOT-rebuffed.jar:0.8.0-SNAPSHOT]
>         at org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:142) ~[drill-java-exec-0.8.0-SNAPSHOT-rebuffed.jar:0.8.0-SNAPSHOT]
>         at org.apache.drill.exec.physical.impl.validate.IteratorValidatorBatchIterator.next(IteratorValidatorBatchIterator.java:118) ~[drill-java-exec-0.8.0-SNAPSHOT-rebuffed.jar:0.8.0-SNAPSHOT]
>         at org.apache.drill.exec.physical.impl.BaseRootExec.next(BaseRootExec.java:67) ~[drill-java-exec-0.8.0-SNAPSHOT-rebuffed.jar:0.8.0-SNAPSHOT]
>         at org.apache.drill.exec.physical.impl.ScreenCreator$ScreenRoot.innerNext(ScreenCreator.java:97) ~[drill-java-exec-0.8.0-SNAPSHOT-rebuffed.jar:0.8.0-SNAPSHOT]
>         at org.apache.drill.exec.physical.impl.BaseRootExec.next(BaseRootExec.java:57) ~[drill-java-exec-0.8.0-SNAPSHOT-rebuffed.jar:0.8.0-SNAPSHOT]
>         at org.apache.drill.exec.work.fragment.FragmentExecutor.run(FragmentExecutor.java:114) ~[drill-java-exec-0.8.0-SNAPSHOT-rebuffed.jar:0.8.0-SNAPSHOT]
>         at org.apache.drill.exec.work.WorkManager$RunnableWrapper.run(WorkManager.java:254) [drill-java-exec-0.8.0-SNAPSHOT-rebuffed.jar:0.8.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]
> {code}
> Let me know if you have any questions



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