statistics.all_null_value is used to build the page index. If statistics doesn't have null count, all_null_value should be false.
| 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 | |
| 880 | TYPED_TEST_SUITE(TestStatisticsHasFlag, Types); |
no test coverage detected