From d34d631519bc49552a1ce5591bc7b32d2e2bad80 Mon Sep 17 00:00:00 2001 From: Pxl Date: Tue, 31 May 2022 19:20:22 +0800 Subject: [PATCH] [bugfix]fix TableFunctionNode memory leak (#9853) --- be/src/exec/table_function_node.cpp | 1 + be/src/util/block_compression.cpp | 4 ++-- be/src/vec/exec/varrow_scanner.h | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/be/src/exec/table_function_node.cpp b/be/src/exec/table_function_node.cpp index 50351438c3..311ef9007c 100644 --- a/be/src/exec/table_function_node.cpp +++ b/be/src/exec/table_function_node.cpp @@ -377,6 +377,7 @@ Status TableFunctionNode::close(RuntimeState* state) { } RETURN_IF_ERROR(exec_debug_action(TExecNodePhase::CLOSE)); Expr::close(_fn_ctxs, state); + vectorized::VExpr::close(_vfn_ctxs, state); if (_num_rows_filtered_counter != nullptr) { COUNTER_SET(_num_rows_filtered_counter, static_cast(_num_rows_filtered)); diff --git a/be/src/util/block_compression.cpp b/be/src/util/block_compression.cpp index 51f485f348..01c3734948 100644 --- a/be/src/util/block_compression.cpp +++ b/be/src/util/block_compression.cpp @@ -418,7 +418,7 @@ public: // follow ZSTD official example // https://github.com/facebook/zstd/blob/dev/examples/streaming_compression.c - Status compress(const std::vector& inputs, Slice* output) const { + Status compress(const std::vector& inputs, Slice* output) const override { if (!ctx_c) return Status::InvalidArgument("compression context NOT initialized"); // reset ctx to start new compress session @@ -479,7 +479,7 @@ public: // follow ZSTD official example // https://github.com/facebook/zstd/blob/dev/examples/streaming_decompression.c - Status decompress(const Slice& input, Slice* output) const { + Status decompress(const Slice& input, Slice* output) const override { if (!ctx_d) return Status::InvalidArgument("decompression context NOT initialized"); // reset ctx to start a new decompress session diff --git a/be/src/vec/exec/varrow_scanner.h b/be/src/vec/exec/varrow_scanner.h index c3740e0d3e..176ddb58f2 100644 --- a/be/src/vec/exec/varrow_scanner.h +++ b/be/src/vec/exec/varrow_scanner.h @@ -67,7 +67,7 @@ private: Status _open_next_reader(); Status _next_arrow_batch(); Status _init_arrow_batch_if_necessary(); - Status _init_src_block(); + Status _init_src_block() override; Status _append_batch_to_src_block(Block* block); Status _cast_src_block(Block* block);