From e05d9dc3f252032c4290d87ddeadb52d9fd78df5 Mon Sep 17 00:00:00 2001 From: garenshi Date: Fri, 29 Nov 2024 23:53:43 +0800 Subject: [PATCH] 1 --- .../exprs/lambda_function/varray_map_function.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/be/src/vec/exprs/lambda_function/varray_map_function.cpp b/be/src/vec/exprs/lambda_function/varray_map_function.cpp index b80b292042735ce..3ade78888f521e5 100644 --- a/be/src/vec/exprs/lambda_function/varray_map_function.cpp +++ b/be/src/vec/exprs/lambda_function/varray_map_function.cpp @@ -187,10 +187,10 @@ class ArrayMapFunction : public LambdaFunction { if (args.current_offset_in_array >= args.cur_size) { args.eos = true; } else { - _extend_data(columns, block, args); + _extend_data(columns, block, args, gap); } if (args.eos) { - _extend_data(columns, block, args); + _extend_data(columns, block, args, gap); args.current_row_idx++; args.current_offset_in_array = 0; if (args.current_row_idx >= block->rows()) { @@ -269,13 +269,13 @@ class ArrayMapFunction : public LambdaFunction { } } - void _extend_data(std::vector& columns, Block* block, LambdaArgs& args) { + void _extend_data(std::vector& columns, Block* block, LambdaArgs& args,int size) { if (!args.current_repeat_times) { return; } - for (int idx : args.output_slot_ref_indexs) { - auto src_column = block->get_by_position(idx).column; - columns[idx]->insert_many_from(*src_column, args.current_row_idx, args.current_repeat_times); + for (int i = 0; i < size; ++i) { + auto src_column = block->get_by_position(i).column; + columns[i]->insert_many_from(*src_column, args.current_row_idx, args.current_repeat_times); } args.current_repeat_times = 0; }