| 161 | |
| 162 | template <typename ValueType> |
| 163 | void 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 |
| 180 | template <typename DType, typename ValueType = typename DType::c_type> |
no test coverage detected