We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 46f5b52 commit 846e6b4Copy full SHA for 846e6b4
src/impala/rle-encoding.h
@@ -144,7 +144,8 @@ class RleEncoder {
144
int bytes_per_run = BitUtil::Ceil(bit_width * MAX_VALUES_PER_LITERAL_RUN, 8.0);
145
int num_runs = BitUtil::Ceil(num_values, MAX_VALUES_PER_LITERAL_RUN);
146
int literal_max_size = num_runs + num_runs * bytes_per_run;
147
- return std::max(MinBufferSize(bit_width), literal_max_size);
+ int min_run_size = MinBufferSize(bit_width);
148
+ return std::max(min_run_size, literal_max_size) + min_run_size;
149
}
150
151
// Encode value. Returns true if the value fits in buffer, false otherwise.
0 commit comments