This is an automated email from the ASF dual-hosted git repository. yiguolei pushed a commit to branch branch-1.1-lts in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-1.1-lts by this push: new 1b2da9effb [fix](if) fix coredump of if const (#14858) (#14878) 1b2da9effb is described below commit 1b2da9effbd3e518ce38181174a6f13ad73f7ac0 Author: yiguolei <676222...@qq.com> AuthorDate: Wed Dec 7 16:44:01 2022 +0800 [fix](if) fix coredump of if const (#14858) (#14878) Co-authored-by: TengJianPing <18241664+jackte...@users.noreply.github.com> --- be/src/vec/functions/if.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/be/src/vec/functions/if.cpp b/be/src/vec/functions/if.cpp index 45202f181c..fd193c43a3 100644 --- a/be/src/vec/functions/if.cpp +++ b/be/src/vec/functions/if.cpp @@ -453,6 +453,19 @@ public: cond_column.column = materialize_column_if_const(cond_column.column); const ColumnWithTypeAndName& arg_cond = block.get_by_position(arguments[0]); + if (auto* then_is_const = check_and_get_column<ColumnConst>(*arg_then.column)) { + if (check_and_get_column<ColumnNullable>(then_is_const->get_data_column())) { + ColumnWithTypeAndName& then_column = block.get_by_position(arguments[1]); + then_column.column = materialize_column_if_const(then_column.column); + } + } + if (auto* else_is_const = check_and_get_column<ColumnConst>(*arg_else.column)) { + if (check_and_get_column<ColumnNullable>(else_is_const->get_data_column())) { + ColumnWithTypeAndName& else_column = block.get_by_position(arguments[2]); + else_column.column = materialize_column_if_const(else_column.column); + } + } + Status ret = Status::OK(); if (execute_for_null_condition(context, block, arg_cond, arg_then, arg_else, result) || execute_for_null_then_else(context, block, arg_cond, arg_then, arg_else, result, --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org