HIVE-10805: OOM in vectorized reduce (Matt McCline reviewed by Gopal V)
Project: http://git-wip-us.apache.org/repos/asf/hive/repo Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/93b55886 Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/93b55886 Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/93b55886 Branch: refs/heads/spark Commit: 93b55886c4629d199bebf8ee0b369d2b3a0cde57 Parents: d66a734 Author: Matt McCline <mmccl...@hortonworks.com> Authored: Mon May 25 15:21:04 2015 -0700 Committer: Matt McCline <mmccl...@hortonworks.com> Committed: Mon May 25 15:21:04 2015 -0700 ---------------------------------------------------------------------- .../hadoop/hive/ql/exec/vector/BytesColumnVector.java | 9 +++++++++ 1 file changed, 9 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hive/blob/93b55886/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/BytesColumnVector.java ---------------------------------------------------------------------- diff --git a/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/BytesColumnVector.java b/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/BytesColumnVector.java index 0552b0c..8ec7ead 100644 --- a/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/BytesColumnVector.java +++ b/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/BytesColumnVector.java @@ -80,6 +80,15 @@ public class BytesColumnVector extends ColumnVector { length = new int[size]; } + /** + * Additional reset work for BytesColumnVector (releasing scratch bytes for by value strings). + */ + @Override + public void reset() { + super.reset(); + initBuffer(0); + } + /** Set a field by reference. * * @param elementNum index within column vector to set