| 86 | }; |
| 87 | |
| 88 | void CheckDictionaryNullCount(const std::shared_ptr<DataType>& dict_type, |
| 89 | const std::string& input_dictionary_json, |
| 90 | const std::string& input_index_json, |
| 91 | const int64_t& expected_null_count, |
| 92 | const int64_t& expected_logical_null_count, |
| 93 | bool expected_may_have_nulls, |
| 94 | bool expected_may_have_logical_nulls) { |
| 95 | std::shared_ptr<arrow::Array> arr = |
| 96 | DictArrayFromJSON(dict_type, input_index_json, input_dictionary_json); |
| 97 | |
| 98 | ASSERT_EQ(arr->null_count(), expected_null_count); |
| 99 | ASSERT_EQ(arr->ComputeLogicalNullCount(), expected_logical_null_count); |
| 100 | ASSERT_EQ(arr->data()->MayHaveNulls(), expected_may_have_nulls); |
| 101 | ASSERT_EQ(arr->data()->MayHaveLogicalNulls(), expected_may_have_logical_nulls); |
| 102 | } |
| 103 | |
| 104 | TEST_F(TestArray, TestNullCount) { |
| 105 | // These are placeholders |
no test coverage detected