drill-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DRILL-3947) IndexOutOfBoundsException for pruning on date column (at large scale)
Date Mon, 19 Oct 2015 07:05:05 GMT

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

ASF GitHub Bot commented on DRILL-3947:
---------------------------------------

Github user amansinha100 commented on the pull request:

    https://github.com/apache/drill/pull/208#issuecomment-149123146
  
    @mehant ,  yes the underlying issue is simple: the null bit vector for the NullableDateVector
is allocated at 4096 bytes (actually, the UInt1Vector is used for this, hence the error message
shows length: 1).  The 4096 is based on the static constant BaseValueVector.INITIAL_VALUE_ALLOCATION.
 Since set() does not do any reallocation, once this limit is reached, attempt to write to
this vector causes IOBE.   setSafe() does realloc()s.   I am pretty sure I can create a test
case with > 4096 files partitioned on date column that will repro this issue.  I will need
to work with QA/performance folks on creating this test.  


> 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: Mehant Baid
>
> 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)

Mime
View raw message