Skip to content

Commit

Permalink
Address review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
pitrou committed Feb 19, 2024
1 parent 55df169 commit 7a19483
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions cpp/src/parquet/encoding.cc
Original file line number Diff line number Diff line change
Expand Up @@ -814,7 +814,7 @@ class ByteStreamSplitEncoderBase : public EncoderImpl,
using TypedEncoder<DType>::Put;

ByteStreamSplitEncoderBase(const ColumnDescriptor* descr, int byte_width,
::arrow::MemoryPool* pool = ::arrow::default_memory_pool())
::arrow::MemoryPool* pool)
: EncoderImpl(descr, Encoding::BYTE_STREAM_SPLIT, pool),
sink_{pool},
byte_width_(byte_width),
Expand All @@ -835,7 +835,7 @@ class ByteStreamSplitEncoderBase : public EncoderImpl,
raw_values, /*width=*/byte_width_, num_values_in_buffer_, output_buffer_raw);
sink_.Reset();
num_values_in_buffer_ = 0;
return std::move(output_buffer);
return output_buffer;
}

void PutSpaced(const T* src, int num_values, const uint8_t* valid_bits,
Expand Down Expand Up @@ -3631,8 +3631,9 @@ class ByteStreamSplitDecoderBase : public DecoderImpl,

void SetData(int num_values, const uint8_t* data, int len) override {
if (static_cast<int64_t>(num_values) * byte_width_ != len) {
throw ParquetException(
"Data size does not match number of values in BYTE_STREAM_SPLIT");
throw ParquetException("Data size (" + std::to_string(len) +
") does not match number of values in BYTE_STREAM_SPLIT (" +
std::to_string(num_values) + ")");
}
DecoderImpl::SetData(num_values, data, len);
stride_ = num_values_;
Expand Down Expand Up @@ -3667,7 +3668,6 @@ class ByteStreamSplitDecoderBase : public DecoderImpl,
const int byte_width_;
int stride_{0};
std::shared_ptr<Buffer> decode_buffer_;
const uint8_t* decode_data_;
};

// BYTE_STREAM_SPLIT decoder for FLOAT, DOUBLE, INT32, INT64
Expand Down

0 comments on commit 7a19483

Please sign in to comment.