Author: sershe
Date: Mon Feb 23 20:52:14 2015
New Revision: 1661777
URL: http://svn.apache.org/r1661777
Log:
Fix a bug caused by compressed boundary estimates for repeated queries
Modified:
hive/branches/llap/common/src/java/org/apache/hadoop/hive/common/DiskRangeList.java
hive/branches/llap/ql/src/java/org/apache/hadoop/hive/ql/io/orc/InStream.java
Modified:
hive/branches/llap/common/src/java/org/apache/hadoop/hive/common/DiskRangeList.java
URL:
http://svn.apache.org/viewvc/hive/branches/llap/common/src/java/org/apache/hadoop/hive/common/DiskRangeList.java?rev=1661777&r1=1661776&r2=1661777&view=diff
==============================================================================
---
hive/branches/llap/common/src/java/org/apache/hadoop/hive/common/DiskRangeList.java
(original)
+++
hive/branches/llap/common/src/java/org/apache/hadoop/hive/common/DiskRangeList.java
Mon Feb 23 20:52:14 2015
@@ -96,6 +96,10 @@ public class DiskRangeList extends DiskR
return replaceSelfWith((DiskRangeList)this.slice(offset, cOffset));
}
+ public boolean hasContiguousNext() {
+ return next != null && end == next.offset;
+ }
+
@VisibleForTesting
public int listSize() {
int result = 1;
Modified:
hive/branches/llap/ql/src/java/org/apache/hadoop/hive/ql/io/orc/InStream.java
URL:
http://svn.apache.org/viewvc/hive/branches/llap/ql/src/java/org/apache/hadoop/hive/ql/io/orc/InStream.java?rev=1661777&r1=1661776&r2=1661777&view=diff
==============================================================================
---
hive/branches/llap/ql/src/java/org/apache/hadoop/hive/ql/io/orc/InStream.java
(original)
+++
hive/branches/llap/ql/src/java/org/apache/hadoop/hive/ql/io/orc/InStream.java
Mon Feb 23 20:52:14 2015
@@ -730,7 +730,7 @@ public abstract class InStream extends I
}
return next;
}
- if (current.end < cbEndOffset && current.next == null) {
+ if (current.end < cbEndOffset && !current.hasContiguousNext()) {
return null; // This is impossible to read from this chunk.
}
@@ -782,11 +782,10 @@ public abstract class InStream extends I
if (DebugUtils.isTraceOrcEnabled()) {
LOG.info("Removing " + tmp + " from ranges");
}
- next = next.next;
+ next = next.hasContiguousNext() ? next.next : null;
tmp.removeSelf();
}
return null; // This is impossible to read from this chunk.
- // TODO: dbl check this is valid; we just did a bunch of changes to the
list.
}
/**