MCPcopy Create free account
hub / github.com/apache/arrow / AssertMetadataLoaded

Method AssertMetadataLoaded

cpp/src/arrow/ipc/read_write_test.cc:3201–3219  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3199 }
3200
3201 void AssertMetadataLoaded(std::vector<int> batch_indices) {
3202 if (batch_indices.size() == 0) {
3203 batch_indices = AllBatchIndices();
3204 }
3205 const auto& read_ranges = tracked_->get_read_ranges();
3206 if (ReadsArePlugged()) {
3207 // The read should have arrived as one large read
3208 ASSERT_EQ(kNumReadsOnOpen + 1, read_ranges.size());
3209 if (batch_indices.size() > 1) {
3210 ASSERT_GT(read_ranges[kNumReadsOnOpen].length, kMaxMetadataSizeBytes);
3211 }
3212 } else {
3213 // We should get many small reads of metadata only
3214 ASSERT_EQ(batch_indices.size() + kNumReadsOnOpen, read_ranges.size());
3215 for (const auto& read_range : read_ranges) {
3216 ASSERT_LT(read_range.length, kMaxMetadataSizeBytes);
3217 }
3218 }
3219 }
3220
3221 std::vector<std::shared_ptr<RecordBatch>> LoadExpected() {
3222 auto buffer_reader = std::make_shared<io::BufferReader>(file_buffer_);

Callers

nothing calls this directly

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected