| 274 | } |
| 275 | |
| 276 | ColumnChunkMetadata ColumnChunkData::getMetadataToFlush() const { |
| 277 | DASSERT(numValues <= capacity); |
| 278 | StorageValue minValue = {}, maxValue = {}; |
| 279 | if (capacity > 0) { |
| 280 | std::optional<NullMask> nullMask; |
| 281 | if (nullData) { |
| 282 | nullMask = nullData->getNullMask(); |
| 283 | } |
| 284 | auto [min, max] = |
| 285 | getMinMaxStorageValue(getData(), 0 /*offset*/, numValues, dataType.getPhysicalType(), |
| 286 | nullMask.has_value() ? &*nullMask : nullptr, true /*valueRequiredIfUnsupported*/); |
| 287 | minValue = min.value_or(StorageValue()); |
| 288 | maxValue = max.value_or(StorageValue()); |
| 289 | } |
| 290 | DASSERT(getBufferSize() == getBufferSize(capacity)); |
| 291 | return getMetadataFunction(buffer->getBuffer(), numValues, minValue, maxValue); |
| 292 | } |
| 293 | |
| 294 | void ColumnChunkData::append(ValueVector* vector, const SelectionView& selView) { |
| 295 | DASSERT(vector->dataType.getPhysicalType() == dataType.getPhysicalType()); |
no test coverage detected