diff --git a/be/src/vec/functions/function_bitmap.cpp b/be/src/vec/functions/function_bitmap.cpp index 9296fb9c105fba..f1570628e65519 100644 --- a/be/src/vec/functions/function_bitmap.cpp +++ b/be/src/vec/functions/function_bitmap.cpp @@ -292,6 +292,9 @@ class FunctionBitmapAlwaysNull : public IFunction { 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); @@ -301,6 +304,10 @@ class FunctionBitmapAlwaysNull : public IFunction { } 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 acfc638330d991..501c15350c3a6b 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 @@ -510,3 +510,6 @@ true -- !sql_orthogonal_bitmap_intersect_count -- 1 1 +-- !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 92c1e435eb0f09..2f01f183e7b6da 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 @@ -762,4 +762,7 @@ suite("test_bitmap_function") { select count(distinct tag) as count1, orthogonal_bitmap_intersect_count(id_bitmap, tag, 0) as count2_bitmap from test_orthog_bitmap_intersect; """ + + // BITMAP_FROM_ARRAY + qt_sql """ select bitmap_to_string(BITMAP_FROM_ARRAY([]));""" }