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

Function CheckDictEncode

cpp/src/arrow/compute/kernels/vector_hash_test.cc:120–131  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

118}
119
120void CheckDictEncode(const std::shared_ptr<Array>& input,
121 const std::shared_ptr<Array>& expected_values,
122 const std::shared_ptr<Array>& expected_indices) {
123 auto type = dictionary(expected_indices->type(), expected_values->type());
124 DictionaryArray expected(type, expected_indices, expected_values);
125
126 ASSERT_OK_AND_ASSIGN(Datum datum_out, DictionaryEncode(input));
127 std::shared_ptr<Array> result = MakeArray(datum_out.array());
128 ValidateOutput(*result);
129
130 ASSERT_ARRAYS_EQUAL(expected, *result);
131}
132
133template <typename Type, typename T>
134void CheckDictEncode(const std::shared_ptr<DataType>& type,

Callers 2

TYPED_TESTFunction · 0.85
TEST_FFunction · 0.85

Calls 5

ValidateOutputFunction · 0.85
MakeArrayFunction · 0.70
dictionaryFunction · 0.50
typeMethod · 0.45
arrayMethod · 0.45

Tested by

no test coverage detected