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

Method TestEquals

cpp/src/parquet/statistics_test.cc:404–420  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

402 }
403
404 void TestEquals() {
405 const auto n_values = 1;
406 auto statistics_have_minmax1 = MakeStatistics<TestType>(this->schema_.Column(0));
407 const auto seed1 = 1;
408 this->GenerateData(n_values, seed1);
409 statistics_have_minmax1->Update(this->values_ptr_, this->values_.size(), 0);
410 auto statistics_have_minmax2 = MakeStatistics<TestType>(this->schema_.Column(0));
411 const auto seed2 = 9999;
412 this->GenerateData(n_values, seed2);
413 statistics_have_minmax2->Update(this->values_ptr_, this->values_.size(), 0);
414 auto statistics_no_minmax = MakeStatistics<TestType>(this->schema_.Column(0));
415
416 ASSERT_EQ(true, statistics_have_minmax1->Equals(*statistics_have_minmax1));
417 ASSERT_EQ(true, statistics_no_minmax->Equals(*statistics_no_minmax));
418 ASSERT_EQ(false, statistics_have_minmax1->Equals(*statistics_have_minmax2));
419 ASSERT_EQ(false, statistics_have_minmax1->Equals(*statistics_no_minmax));
420 }
421
422 void TestFullRoundtrip(int64_t num_values, int64_t null_count) {
423 this->GenerateData(num_values);

Callers 1

TYPED_TESTFunction · 0.45

Calls 5

ColumnMethod · 0.45
GenerateDataMethod · 0.45
UpdateMethod · 0.45
sizeMethod · 0.45
EqualsMethod · 0.45

Tested by

no test coverage detected