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

Function CheckDictionaryNullCount

cpp/src/arrow/array/array_test.cc:88–102  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

86};
87
88void 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
104TEST_F(TestArray, TestNullCount) {
105 // These are placeholders

Callers 1

TEST_FFunction · 0.85

Calls 4

DictArrayFromJSONFunction · 0.85
null_countMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected