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

Method TestMissingNullCount

cpp/src/parquet/statistics_test.cc:862–877  ·  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

860 // statistics.all_null_value is used to build the page index.
861 // If statistics doesn't have null count, all_null_value should be false.
862 void TestMissingNullCount() {
863 EncodedStatistics encoded_statistics;
864 encoded_statistics.has_null_count = false;
865 auto statistics = Statistics::Make(this->schema_.Column(0), &encoded_statistics,
866 /*num_values=*/1000);
867 auto typed_stats = std::dynamic_pointer_cast<TypedStatistics<TestType>>(statistics);
868 EXPECT_FALSE(typed_stats->HasNullCount());
869 auto encoded = typed_stats->Encode();
870 EXPECT_FALSE(encoded.all_null_value);
871 EXPECT_FALSE(encoded.has_null_count);
872 EXPECT_FALSE(encoded.has_distinct_count);
873 EXPECT_FALSE(encoded.has_min);
874 EXPECT_FALSE(encoded.has_max);
875 EXPECT_FALSE(encoded.is_min_value_exact.has_value());
876 EXPECT_FALSE(encoded.is_max_value_exact.has_value());
877 }
878};
879
880TYPED_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