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

Method TestMissingNullCount

cpp/src/parquet/statistics_test.cc:795–810  ·  view source on GitHub ↗

statistics.all_null_value is used to build the page index. If statistics doesn't have null count, all_null_value should be false.

Source from the content-addressed store, hash-verified

793 // statistics.all_null_value is used to build the page index.
794 // If statistics doesn't have null count, all_null_value should be false.
795 void TestMissingNullCount() {
796 EncodedStatistics encoded_statistics;
797 encoded_statistics.has_null_count = false;
798 auto statistics = Statistics::Make(this->schema_.Column(0), &encoded_statistics,
799 /*num_values=*/1000);
800 auto typed_stats = std::dynamic_pointer_cast<TypedStatistics<TestType>>(statistics);
801 EXPECT_FALSE(typed_stats->HasNullCount());
802 auto encoded = typed_stats->Encode();
803 EXPECT_FALSE(encoded.all_null_value);
804 EXPECT_FALSE(encoded.has_null_count);
805 EXPECT_FALSE(encoded.has_distinct_count);
806 EXPECT_FALSE(encoded.has_min);
807 EXPECT_FALSE(encoded.has_max);
808 EXPECT_FALSE(encoded.is_min_value_exact.has_value());
809 EXPECT_FALSE(encoded.is_max_value_exact.has_value());
810 }
811};
812
813TYPED_TEST_SUITE(TestStatisticsHasFlag, Types);

Callers 1

TYPED_TESTFunction · 0.80

Calls 4

HasNullCountMethod · 0.80
MakeFunction · 0.70
ColumnMethod · 0.45
EncodeMethod · 0.45

Tested by

no test coverage detected