diff --git a/be/src/vec/functions/function_bitmap.cpp b/be/src/vec/functions/function_bitmap.cpp index 988abdf11e..038741c394 100644 --- a/be/src/vec/functions/function_bitmap.cpp +++ b/be/src/vec/functions/function_bitmap.cpp @@ -382,6 +382,9 @@ public: if (check_column(nested_column)) { Impl::template vector(offset_column_data, nested_column, nested_null_map, res, null_map); + } else if (check_column(nested_column)) { + Impl::template vector(offset_column_data, nested_column, + nested_null_map, res, null_map); } else if (check_column(nested_column)) { Impl::template vector(offset_column_data, nested_column, nested_null_map, res, null_map); @@ -391,6 +394,10 @@ public: } else if (check_column(nested_column)) { Impl::template vector(offset_column_data, nested_column, nested_null_map, res, null_map); + } else { + return Status::RuntimeError("Illegal column {} of argument of function {}", + block.get_by_position(arguments[0]).column->get_name(), + get_name()); } } else { return Status::RuntimeError("Illegal column {} of argument of function {}", diff --git a/regression-test/data/query_p0/sql_functions/bitmap_functions/test_bitmap_function.out b/regression-test/data/query_p0/sql_functions/bitmap_functions/test_bitmap_function.out index b009f1f1e8..d6ffc0d621 100644 --- a/regression-test/data/query_p0/sql_functions/bitmap_functions/test_bitmap_function.out +++ b/regression-test/data/query_p0/sql_functions/bitmap_functions/test_bitmap_function.out @@ -702,3 +702,9 @@ true \N \N +-- !sql -- + + +-- !sql -- + + diff --git a/regression-test/suites/query_p0/sql_functions/bitmap_functions/test_bitmap_function.groovy b/regression-test/suites/query_p0/sql_functions/bitmap_functions/test_bitmap_function.groovy index 7847376c2a..709d289721 100644 --- a/regression-test/suites/query_p0/sql_functions/bitmap_functions/test_bitmap_function.groovy +++ b/regression-test/suites/query_p0/sql_functions/bitmap_functions/test_bitmap_function.groovy @@ -1003,4 +1003,10 @@ suite("test_bitmap_function") { qt_sql_bitmap_remove_not_null8 """ select bitmap_to_string(bitmap_remove(id, 4294967296)) s from test_bitmap_remove_not_null order by s; """ qt_sql_bitmap_remove_not_null9 """ select bitmap_to_string(bitmap_remove(id, null)) s from test_bitmap_remove_not_null order by s; """ + // BITMAP_FROM_ARRAY + sql """ set experimental_enable_nereids_planner=false; """ + qt_sql """ select bitmap_to_string(BITMAP_FROM_ARRAY([]));""" + + sql """ set experimental_enable_nereids_planner=true; """ + qt_sql """ select bitmap_to_string(BITMAP_FROM_ARRAY([]));""" }