[enhancement] Refactor to improve the usability of MemTracker (step2) (#10823)
This commit is contained in:
@ -22,7 +22,6 @@
|
||||
|
||||
#include "olap/tablet_schema.h"
|
||||
#include "olap/types.h"
|
||||
#include "runtime/mem_tracker.h"
|
||||
#include "runtime/string_value.h"
|
||||
#include "testutil/array_utils.h"
|
||||
|
||||
@ -52,8 +51,7 @@ static TypeInfoPtr get_type_info(const ColumnPB& column_pb) {
|
||||
|
||||
static void test_array_parser(const ColumnPB& column_pb, const std::string& json,
|
||||
const CollectionValue& expect) {
|
||||
MemTracker tracker(1024 * 1024, "ArrayParserTest");
|
||||
MemPool mem_pool(&tracker);
|
||||
MemPool mem_pool;
|
||||
FunctionContext context;
|
||||
ArrayUtils::prepare_context(context, mem_pool, column_pb);
|
||||
CollectionValue actual;
|
||||
@ -175,8 +173,7 @@ TEST(ArrayParserTest, TestDecimalArray) {
|
||||
|
||||
TEST(ArrayParserTest, TestFreePool) {
|
||||
auto column_pb = create_column_pb("ARRAY", "DECIMAL");
|
||||
MemTracker tracker(1024 * 1024, "ArrayParserTest");
|
||||
MemPool mem_pool(&tracker);
|
||||
MemPool mem_pool;
|
||||
FunctionContext context;
|
||||
ArrayUtils::prepare_context(context, mem_pool, column_pb);
|
||||
int alignment = 1;
|
||||
|
||||
Reference in New Issue
Block a user