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

Function CheckDictionaryNullCount

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

Source from the content-addressed store, hash-verified

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