Skip to content
This repository was archived by the owner on May 9, 2024. It is now read-only.

Commit d64d4f6

Browse files
committed
Fix get_bit_width usage with varlen array types
1 parent e4702f8 commit d64d4f6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

omniscidb/QueryEngine/OutputBufferInitialization.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ int64_t get_agg_initial_val(hdk::ir::AggType agg,
116116
CHECK(!(type->isString() || type->isExtDictionary()) ||
117117
(agg == hdk::ir::AggType::kSingleValue || agg == hdk::ir::AggType::kSample));
118118
const auto byte_width =
119-
enable_compaction
119+
enable_compaction && type->size() > 0
120120
? compact_byte_width(static_cast<unsigned>(get_bit_width(type) >> 3),
121121
unsigned(min_byte_width_to_compact))
122122
: sizeof(int64_t);

0 commit comments

Comments
 (0)