We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1fe7764 commit b3a68e6Copy full SHA for b3a68e6
cpp/src/arrow/parquet/parquet-io-test.cc
@@ -120,7 +120,8 @@ class BufferReader : public io::RandomAccessFile {
120
121
Status Read(int64_t nbytes, int64_t* bytes_read, uint8_t* buffer) override {
122
memcpy(buffer, buffer_ + position_, nbytes);
123
- position_ += nbytes;
+ *bytes_read = std::min(nbytes, buffer_size_ - position_);
124
+ position_ += *bytes_read;
125
return Status::OK();
126
}
127
@@ -172,7 +173,7 @@ TEST(TestParquetReadSource, Basics) {
172
173
174
auto expected_buffer = std::make_shared<::parquet::Buffer>(data_buffer + 4, 7);
175
- ASSERT_TRUE(expected_buffer->Equals(*pq_buffer));
176
+ ASSERT_TRUE(expected_buffer->Equals(*pq_buffer.get()));
177
178
179
} // namespace parquet
0 commit comments