Skip to content

Commit

Permalink
[fix](field) fix coredump of field function when the first argument i…
Browse files Browse the repository at this point in the history
…s const
  • Loading branch information
jacktengg committed Oct 24, 2023
1 parent bab7581 commit 684f7ac
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions be/src/vec/functions/least_greast.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,12 @@ struct FunctionFieldImpl {
auto& res_data = static_cast<ColumnInt32*>(result_column)->get_data();

const auto& column_size = arguments.size();
for (int i = 1; i < column_size; ++i) {
block.replace_by_position(
arguments[i],
ColumnConst::create(block.get_by_position(arguments[i]).column, 1));
}

ColumnPtr argument_columns[column_size];
for (int i = 0; i < column_size; ++i) {
argument_columns[i] = block.get_by_position(arguments[i]).column;
Expand Down

0 comments on commit 684f7ac

Please sign in to comment.