Repository: parquet-cpp Updated Branches: refs/heads/master 527d53f7c -> ac4e80c97
PARQUET-739: Don't use a static buffer for data accessed by multiple threads This buffer is used in multiple threads, so it cannot be static. It's small enough to just have it on the stack. I could add a vector to the RleDecoder class as well if you prefer Author: fscheibner <[email protected]> Closes #175 from flode/static and squashes the following commits: 9876c31 [fscheibner] Don't use a static buffer for data accessed by multiple threads Project: http://git-wip-us.apache.org/repos/asf/parquet-cpp/repo Commit: http://git-wip-us.apache.org/repos/asf/parquet-cpp/commit/ac4e80c9 Tree: http://git-wip-us.apache.org/repos/asf/parquet-cpp/tree/ac4e80c9 Diff: http://git-wip-us.apache.org/repos/asf/parquet-cpp/diff/ac4e80c9 Branch: refs/heads/master Commit: ac4e80c97ab56483b8adca3a4d7881b6e6e7b0bb Parents: 527d53f Author: fscheibner <[email protected]> Authored: Mon Oct 10 11:19:56 2016 -0400 Committer: Wes McKinney <[email protected]> Committed: Mon Oct 10 11:19:56 2016 -0400 ---------------------------------------------------------------------- src/parquet/util/rle-encoding.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/parquet-cpp/blob/ac4e80c9/src/parquet/util/rle-encoding.h ---------------------------------------------------------------------- diff --git a/src/parquet/util/rle-encoding.h b/src/parquet/util/rle-encoding.h index c6b9577..7aba813 100644 --- a/src/parquet/util/rle-encoding.h +++ b/src/parquet/util/rle-encoding.h @@ -320,7 +320,7 @@ inline int RleDecoder::GetBatchWithDict( std::min(batch_size - values_read, static_cast<int>(literal_count_)); const int buffer_size = 1024; - static int indices[buffer_size]; + int indices[buffer_size]; literal_batch = std::min(literal_batch, buffer_size); int actual_read = bit_reader_.GetBatch(bit_width_, &indices[0], literal_batch); DCHECK_EQ(actual_read, literal_batch);
