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

Method TestEquals

cpp/src/parquet/statistics_test.cc:471–487  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

469 }
470
471 void TestEquals() {
472 const auto n_values = 1;
473 auto statistics_have_minmax1 = MakeStatistics<TestType>(this->schema_.Column(0));
474 const auto seed1 = 1;
475 this->GenerateData(n_values, seed1);
476 statistics_have_minmax1->Update(this->values_ptr_, this->values_.size(), 0);
477 auto statistics_have_minmax2 = MakeStatistics<TestType>(this->schema_.Column(0));
478 const auto seed2 = 9999;
479 this->GenerateData(n_values, seed2);
480 statistics_have_minmax2->Update(this->values_ptr_, this->values_.size(), 0);
481 auto statistics_no_minmax = MakeStatistics<TestType>(this->schema_.Column(0));
482
483 ASSERT_EQ(true, statistics_have_minmax1->Equals(*statistics_have_minmax1));
484 ASSERT_EQ(true, statistics_no_minmax->Equals(*statistics_no_minmax));
485 ASSERT_EQ(false, statistics_have_minmax1->Equals(*statistics_have_minmax2));
486 ASSERT_EQ(false, statistics_have_minmax1->Equals(*statistics_no_minmax));
487 }
488
489 void TestFullRoundtrip(int64_t num_values, int64_t null_count) {
490 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