| 335 | } |
| 336 | |
| 337 | ColumnChunkMetadata ColumnChunkData::flushBuffer(PageAllocator& pageAllocator, |
| 338 | const PageRange& entry, const ColumnChunkMetadata& otherMetadata) const { |
| 339 | const auto bufferSizeToFlush = getBufferSize(numValues); |
| 340 | if (!otherMetadata.compMeta.isConstant() && bufferSizeToFlush != 0) { |
| 341 | DASSERT(bufferSizeToFlush <= buffer->getBuffer().size_bytes()); |
| 342 | const auto bufferToFlush = buffer->getBuffer().subspan(0, bufferSizeToFlush); |
| 343 | return flushBufferFunction(bufferToFlush, pageAllocator.getDataFH(), entry, otherMetadata); |
| 344 | } |
| 345 | DASSERT(otherMetadata.getNumPages() == 0); |
| 346 | return otherMetadata; |
| 347 | } |
| 348 | |
| 349 | uint64_t ColumnChunkData::getBufferSize(uint64_t capacity_) const { |
| 350 | switch (dataType.getLogicalTypeID()) { |
no test coverage detected