| 228 | } |
| 229 | |
| 230 | void restoreVectorStringViews( |
| 231 | vector_size_t size, |
| 232 | const BufferPtr& strings, |
| 233 | const std::vector<BufferPtr>& stringBuffers) { |
| 234 | auto rawBytes = strings->as<char>(); |
| 235 | auto rawValues = strings->asMutable<StringView>(); |
| 236 | for (auto i = 0; i < size; ++i) { |
| 237 | auto value = rawValues[i]; |
| 238 | if (!value.isInline()) { |
| 239 | auto offset = *reinterpret_cast<const int64_t*>( |
| 240 | rawBytes + i * sizeof(StringView) + 8); |
| 241 | rawValues[i] = |
| 242 | StringView(computeStringPointer(offset, stringBuffers), value.size()); |
| 243 | } |
| 244 | } |
| 245 | } |
| 246 | |
| 247 | bool isVarcharOrVarbinary(const BaseVector& vector) { |
| 248 | return vector.typeKind() == TypeKind::VARCHAR || |
no test coverage detected