This is an automated email from the ASF dual-hosted git repository. yiguolei pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push: new 49b73483fd2 [fix](field) fix coredump of field function when the first argument is const (#25859) 49b73483fd2 is described below commit 49b73483fd22079bf4201a0900fd443d01639686 Author: TengJianPing <18241664+jackte...@users.noreply.github.com> AuthorDate: Wed Oct 25 14:14:32 2023 +0800 [fix](field) fix coredump of field function when the first argument is const (#25859) --- be/src/vec/functions/function_multi_same_args.h | 2 ++ .../sql_functions/string_functions/test_string_function_regexp.out | 6 ++++++ .../string_functions/test_string_function_regexp.groovy | 3 +++ 3 files changed, 11 insertions(+) diff --git a/be/src/vec/functions/function_multi_same_args.h b/be/src/vec/functions/function_multi_same_args.h index aaac717331c..a43b31c05f1 100644 --- a/be/src/vec/functions/function_multi_same_args.h +++ b/be/src/vec/functions/function_multi_same_args.h @@ -37,6 +37,8 @@ public: bool use_default_implementation_for_nulls() const override { return true; } + bool use_default_implementation_for_constants() const override { return false; } + bool is_variadic() const override { return true; } size_t get_number_of_arguments() const override { return 0; } diff --git a/regression-test/data/query_p0/sql_functions/string_functions/test_string_function_regexp.out b/regression-test/data/query_p0/sql_functions/string_functions/test_string_function_regexp.out index 133076ec13b..cfe2fd3eaf7 100644 --- a/regression-test/data/query_p0/sql_functions/string_functions/test_string_function_regexp.out +++ b/regression-test/data/query_p0/sql_functions/string_functions/test_string_function_regexp.out @@ -230,3 +230,9 @@ Suzi Suzi Ben +-- !sql_field4 -- +3 + +-- !sql_field5 -- +2 + diff --git a/regression-test/suites/query_p0/sql_functions/string_functions/test_string_function_regexp.groovy b/regression-test/suites/query_p0/sql_functions/string_functions/test_string_function_regexp.groovy index 59414f5c1b7..d25c995ea48 100644 --- a/regression-test/suites/query_p0/sql_functions/string_functions/test_string_function_regexp.groovy +++ b/regression-test/suites/query_p0/sql_functions/string_functions/test_string_function_regexp.groovy @@ -151,5 +151,8 @@ suite("test_string_function_regexp") { qt_sql_field1 "select name from ${tbName2} order by field(name,'Suzi','Ben','Henry');" qt_sql_field2 "select name from ${tbName2} order by field(name,'Ben','Henry');" qt_sql_field3 "select name from ${tbName2} order by field(name,'Henry') desc,id;" + + qt_sql_field4 "SELECT FIELD('21','2130', '2131', '21');" + qt_sql_field5 "SELECT FIELD(21, 2130, 21, 2131);" } --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org