This is an automated email from the ASF dual-hosted git repository. yiguolei pushed a commit to branch dev-1.1.2 in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/dev-1.1.2 by this push: new dba06fe0fb [fix] need materialize condition conlumn in if function (#11229) (#11242) dba06fe0fb is described below commit dba06fe0fbca30051be15fbce4d353fffce976df Author: yiguolei <676222...@qq.com> AuthorDate: Wed Jul 27 12:27:21 2022 +0800 [fix] need materialize condition conlumn in if function (#11229) (#11242) Co-authored-by: starocean999 <40539150+starocean...@users.noreply.github.com> --- be/src/vec/functions/if.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/be/src/vec/functions/if.cpp b/be/src/vec/functions/if.cpp index 0496222b2e..714203f492 100644 --- a/be/src/vec/functions/if.cpp +++ b/be/src/vec/functions/if.cpp @@ -426,7 +426,6 @@ public: Status execute_impl(FunctionContext* context, Block& block, const ColumnNumbers& arguments, size_t result, size_t input_rows_count) override { - const ColumnWithTypeAndName& arg_cond = block.get_by_position(arguments[0]); const ColumnWithTypeAndName& arg_then = block.get_by_position(arguments[1]); const ColumnWithTypeAndName& arg_else = block.get_by_position(arguments[2]); @@ -437,6 +436,10 @@ public: return Status::OK(); } + ColumnWithTypeAndName& cond_column = block.get_by_position(arguments[0]); + cond_column.column = materialize_column_if_const(cond_column.column); + const ColumnWithTypeAndName& arg_cond = block.get_by_position(arguments[0]); + 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