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

Function AssertColumnValues

cpp/src/parquet/reader_test.cc:178–190  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

176// TODO: Assert on definition and repetition levels
177template <typename DType, typename ValueType = typename DType::c_type>
178void AssertColumnValues(std::shared_ptr<TypedColumnReader<DType>> col, int64_t batch_size,
179 int64_t expected_levels_read,
180 const std::vector<ValueType>& expected_values,
181 int64_t expected_values_read) {
182 std::vector<ValueType> values(batch_size);
183 int64_t values_read;
184
185 auto levels_read =
186 col->ReadBatch(batch_size, nullptr, nullptr, values.data(), &values_read);
187 ASSERT_EQ(expected_levels_read, levels_read);
188 ASSERT_EQ(expected_values_read, values_read);
189 AssertColumnValuesEqual(col->descr(), expected_values, values);
190}
191
192template <typename DType, typename ValueType = typename DType::c_type>
193void AssertColumnValuesEqual(std::shared_ptr<TypedColumnReader<DType>> left_col,

Callers 1

TEST_PFunction · 0.85

Calls 4

AssertColumnValuesEqualFunction · 0.85
ReadBatchMethod · 0.45
dataMethod · 0.45
descrMethod · 0.45

Tested by

no test coverage detected