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

Method ReadAndCompare

cpp/src/parquet/column_writer_test.cc:335–349  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

333 }
334
335 void ReadAndCompare(Compression::type compression, int64_t num_rows,
336 bool page_checksum_verify) {
337 this->SetupValuesOut(num_rows);
338 this->ReadColumnFully(compression, page_checksum_verify);
339 auto comparator = MakeComparator<TestType>(this->descr_);
340 for (size_t i = 0; i < this->values_.size(); i++) {
341 if (comparator->Compare(this->values_[i], this->values_out_[i]) ||
342 comparator->Compare(this->values_out_[i], this->values_[i])) {
343 ARROW_SCOPED_TRACE("i = ", i);
344 }
345 ASSERT_FALSE(comparator->Compare(this->values_[i], this->values_out_[i]));
346 ASSERT_FALSE(comparator->Compare(this->values_out_[i], this->values_[i]));
347 }
348 ASSERT_EQ(this->values_, this->values_out_);
349 }
350
351 int64_t metadata_num_values() {
352 // Metadata accessor must be created lazily.

Callers

nothing calls this directly

Calls 4

ReadColumnFullyMethod · 0.95
SetupValuesOutMethod · 0.80
sizeMethod · 0.45
CompareMethod · 0.45

Tested by

no test coverage detected