You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "Aman Sinha (JIRA)" <ji...@apache.org> on 2015/10/18 18:53:05 UTC

[jira] [Commented] (DRILL-3947) IndexOutOfBoundsException for pruning on date column (at large scale)

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

Aman Sinha commented on DRILL-3947:
-----------------------------------

I believe we should be using a setSafe() instead of set() for the NullableDateVector when populating the pruning vector.  I am looking into this. 

> IndexOutOfBoundsException for pruning on date column (at large scale)
> ---------------------------------------------------------------------
>
>                 Key: DRILL-3947
>                 URL: https://issues.apache.org/jira/browse/DRILL-3947
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Query Planning & Optimization
>    Affects Versions: 1.2.0
>            Reporter: Aman Sinha
>            Assignee: Aman Sinha
>
> When a large table (about 52 B records, 10K files, created with CTAS auto-partitioning) partitioned by a 'date' column,  partition pruning is encountering an error.  At smaller scales, partition pruning succeeds. At this time, the problem seems specific to date columns only. This column is a nullable column and has NULL values in the data. 
> Here's the query:
> {code}
> explain plan for select count(*) from `table` where `date` = '2015-07-01';
> {code}
> Here's the error stack: 
> {code}
> WARN  o.a.d.e.p.l.partition.PruneScanRule - Exception while trying to prune partition.
> java.lang.IndexOutOfBoundsException: index: 4096, length: 1 (expected: range(0, 4096))
>         at io.netty.buffer.DrillBuf.checkIndexD(DrillBuf.java:189) ~[drill-java-exec-1.2.0.jar:4.0.27.Final]
>         at io.netty.buffer.DrillBuf.chk(DrillBuf.java:211) ~[drill-java-exec-1.2.0.jar:4.0.27.Final]
>         at io.netty.buffer.DrillBuf.setByte(DrillBuf.java:612) ~[drill-java-exec-1.2.0.jar:4.0.27.Final]
>         at org.apache.drill.exec.vector.UInt1Vector$Mutator.set(UInt1Vector.java:411) ~[drill-java-exec-1.2.0.jar:1.2.0]
>         at org.apache.drill.exec.vector.NullableDateVector$Mutator.set(NullableDateVector.java:440) ~[drill-java-exec-1.2.0.jar:1.2.0]
>         at org.apache.drill.exec.store.parquet.ParquetGroupScan.populatePruningVector(ParquetGroupScan.java:420) ~[drill-java-exec-1.2.0.jar:1.2.0]
>         at org.apache.drill.exec.planner.ParquetPartitionDescriptor.populatePartitionVectors(ParquetPartitionDescriptor.java:96) ~[drill-java-exec-1.2.0.jar:1.2.0]
>         at org.apache.drill.exec.planner.logical.partition.PruneScanRule.doOnMatch(PruneScanRule.java:212) ~[drill-java-exec-1.2.0.jar:1.2.0]
>         at org.apache.drill.exec.planner.logical.partition.ParquetPruneScanRule$2.onMatch(ParquetPruneScanRule.java:87) [drill-java-exec-1.2.0.jar:1.2.0]
>         at org.apache.calcite.plan.volcano.VolcanoRuleCall.onMatch(VolcanoRuleCall.java:228) [calcite-core-1.4.0-drill-r5.jar:1.4.0-drill-r5]
>         at org.apache.calcite.plan.volcano.VolcanoPlanner.findBestExp(VolcanoPlanner.java:808) [calcite-core-1.4.0-drill-r5.jar:1.4.0-drill-r5]
> {code}



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