| 88 | } |
| 89 | |
| 90 | VectorPtr deserialize( |
| 91 | HashStringAllocator::Position position, |
| 92 | const TypePtr& type, |
| 93 | vector_size_t numRows) { |
| 94 | auto data = BaseVector::create(type, numRows, pool()); |
| 95 | // Set all rows in data to NULL to verify that deserialize can clear nulls |
| 96 | // correctly. |
| 97 | for (auto i = 0; i < numRows; ++i) { |
| 98 | data->setNull(i, true); |
| 99 | } |
| 100 | |
| 101 | auto in = HashStringAllocator::prepareRead(position.header); |
| 102 | for (auto i = 0; i < numRows; ++i) { |
| 103 | ContainerRowSerde::deserialize(*in, i, data.get()); |
| 104 | } |
| 105 | return data; |
| 106 | } |
| 107 | |
| 108 | void testRoundTrip(const VectorPtr& data) { |
| 109 | auto position = serialize(data); |
nothing calls this directly
no test coverage detected