reduce EncodePivot memory usage with lots of columns and few rows

This commit is contained in:
saltonz
2023-11-16 14:46:15 +00:00
committed by ob-robot
parent cef829bb89
commit 960df4d65c
11 changed files with 47 additions and 23 deletions

View File

@ -283,7 +283,7 @@ public:
K(loop), K(sizeof(T)), K(min), K(max), K(mon), K(use_null_replace_ref), K(actual_uint_width));
ObIntegerStreamEncoderCtx ctx;
ObCSEncodingOpt encoding_opt;
ObArenaAllocator alloctor;
ObArenaAllocator allocator;
const ObCompressorType compress_type = ObCompressorType::ZSTD_1_3_8_COMPRESSOR;
ctx.meta_.width_ = actual_uint_width;
ctx.meta_.type_ = type;
@ -302,10 +302,10 @@ public:
if (ctx.meta_.is_use_null_replace_value()) {
ctx.meta_.set_null_replaced_value(null_replace_value);
}
ctx.build_stream_encoder_info(has_null, false, &encoding_opt, nullptr, -1, compress_type, &alloctor);
ctx.build_stream_encoder_info(has_null, false, &encoding_opt, nullptr, -1, compress_type, &allocator);
ObIntegerStreamEncoder encoder;
ObColDatums *datums = new ObColDatums();
ObColDatums *datums = new ObColDatums(allocator);
datums->reserve(1 << 20);
generate_datums<T>(datums, size, has_null, min, max, mon);
int64_t bitmap_size = pad8(size);