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

Method TestReset

cpp/src/parquet/statistics_test.cc:362–378  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

360 }
361
362 void TestReset() {
363 this->GenerateData(1000);
364
365 auto statistics = MakeStatistics<TestType>(this->schema_.Column(0));
366 statistics->Update(this->values_ptr_, this->values_.size(), 0);
367 ASSERT_EQ(this->values_.size(), statistics->num_values());
368
369 statistics->Reset();
370 ASSERT_TRUE(statistics->HasNullCount());
371 ASSERT_FALSE(statistics->HasMinMax());
372 ASSERT_FALSE(statistics->HasDistinctCount());
373 ASSERT_EQ(0, statistics->null_count());
374 ASSERT_EQ(0, statistics->num_values());
375 ASSERT_EQ(0, statistics->distinct_count());
376 ASSERT_EQ("", statistics->EncodeMin());
377 ASSERT_EQ("", statistics->EncodeMax());
378 }
379
380 void TestMerge() {
381 int num_null[2];

Callers 1

TYPED_TESTFunction · 0.80

Calls 13

HasNullCountMethod · 0.80
HasMinMaxMethod · 0.80
HasDistinctCountMethod · 0.80
EncodeMinMethod · 0.80
EncodeMaxMethod · 0.80
GenerateDataMethod · 0.45
ColumnMethod · 0.45
UpdateMethod · 0.45
sizeMethod · 0.45
num_valuesMethod · 0.45
ResetMethod · 0.45
null_countMethod · 0.45

Tested by

no test coverage detected