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