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

Function AssertColumnValuesEqual

cpp/src/parquet/reader_test.cc:163–177  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

161
162template <typename ValueType>
163void AssertColumnValuesEqual(const ColumnDescriptor* descr,
164 const std::vector<ValueType>& left_values,
165 const std::vector<ValueType>& right_values) {
166 if constexpr (std::is_same_v<ValueType, FLBA>) {
167 // operator== for FLBA in test_util.h is unusable (it hard-codes length to 12)
168 const auto length = descr->type_length();
169 for (const auto& [left, right] : Zip(left_values, right_values)) {
170 std::string_view left_view(reinterpret_cast<const char*>(left.ptr), length);
171 std::string_view right_view(reinterpret_cast<const char*>(right.ptr), length);
172 ASSERT_EQ(left_view, right_view);
173 }
174 } else {
175 ASSERT_EQ(left_values, right_values);
176 }
177}
178
179// TODO: Assert on definition and repetition levels
180template <typename DType, typename ValueType = typename DType::c_type>

Callers 1

AssertColumnValuesFunction · 0.85

Calls 10

ZipClass · 0.85
type_lengthMethod · 0.80
ReadBatchMethod · 0.45
dataMethod · 0.45
descrMethod · 0.45
ColumnIndexMethod · 0.45
schemaMethod · 0.45
metadataMethod · 0.45
RowGroupMethod · 0.45
ColumnMethod · 0.45

Tested by

no test coverage detected