Skip to content

Commit 408d788

Browse files
flodewesm
authored andcommitted
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 <florian.scheibner@snowflake.net> Closes apache#175 from flode/static and squashes the following commits: 9876c31 [fscheibner] Don't use a static buffer for data accessed by multiple threads Change-Id: I02882e98a517fba882fd61f7ed3388ee255fe862
1 parent 20d4a17 commit 408d788

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cpp/src/parquet/util/rle-encoding.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ inline int RleDecoder::GetBatchWithDict(
320320
std::min(batch_size - values_read, static_cast<int>(literal_count_));
321321

322322
const int buffer_size = 1024;
323-
static int indices[buffer_size];
323+
int indices[buffer_size];
324324
literal_batch = std::min(literal_batch, buffer_size);
325325
int actual_read = bit_reader_.GetBatch(bit_width_, &indices[0], literal_batch);
326326
DCHECK_EQ(actual_read, literal_batch);

0 commit comments

Comments
 (0)