Skip to content

Commit

Permalink
fix assertion
Browse files Browse the repository at this point in the history
  • Loading branch information
ray6080 committed Oct 10, 2023
1 parent 01e5ecf commit 5c55f88
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 4 deletions.
1 change: 1 addition & 0 deletions src/storage/store/column_chunk.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,7 @@ uint32_t ColumnChunk::getDataTypeSizeInChunk(LogicalType& dataType) {
uint64_t ColumnChunk::getBufferSize() const {
switch (dataType.getLogicalTypeID()) {
case LogicalTypeID::BOOL: {
// 8 values per byte, and we need a buffer size which is a multiple of 8 bytes.
return ceil(capacity / 8.0 / 8.0) * 8;
}
case LogicalTypeID::FIXED_LIST: {
Expand Down
1 change: 0 additions & 1 deletion src/storage/store/node_column.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#include "storage/store/node_column.h"

#include <memory>
#include <utility>

#include "storage/stats/property_statistics.h"
#include "storage/storage_structure/storage_structure.h"
Expand Down
1 change: 0 additions & 1 deletion src/storage/store/struct_column_chunk.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ StructColumnChunk::StructColumnChunk(LogicalType dataType, bool enableCompressio
void StructColumnChunk::append(ColumnChunk* other, offset_t startPosInOtherChunk,
offset_t startPosInChunk, uint32_t numValuesToAppend) {
auto otherStructChunk = dynamic_cast<StructColumnChunk*>(other);
assert(other->getNumChildren() == getNumChildren());
nullChunk->append(
other->getNullChunk(), startPosInOtherChunk, startPosInChunk, numValuesToAppend);
for (auto i = 0u; i < childChunks.size(); i++) {
Expand Down
2 changes: 0 additions & 2 deletions src/storage/store/struct_node_column.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,6 @@ void StructNodeColumn::append(ColumnChunk* columnChunk, uint64_t nodeGroupIdx) {
NodeColumn::append(columnChunk, nodeGroupIdx);
assert(columnChunk->getDataType().getLogicalTypeID() == LogicalTypeID::STRUCT);
auto structColumnChunk = static_cast<StructColumnChunk*>(columnChunk);
// Children column chunks.
assert(childrenColumns.size() == columnChunk->getNumChildren());
for (auto i = 0u; i < childColumns.size(); i++) {
childColumns[i]->append(structColumnChunk->getChild(i), nodeGroupIdx);
}
Expand Down

0 comments on commit 5c55f88

Please sign in to comment.