[fix](bitmap) fix coredump of bitmap_from_array caused by null array literal (#24404)
This commit is contained in:
@ -382,6 +382,9 @@ public:
|
||||
if (check_column<ColumnInt8>(nested_column)) {
|
||||
Impl::template vector<ColumnInt8>(offset_column_data, nested_column,
|
||||
nested_null_map, res, null_map);
|
||||
} else if (check_column<ColumnUInt8>(nested_column)) {
|
||||
Impl::template vector<ColumnUInt8>(offset_column_data, nested_column,
|
||||
nested_null_map, res, null_map);
|
||||
} else if (check_column<ColumnInt16>(nested_column)) {
|
||||
Impl::template vector<ColumnInt16>(offset_column_data, nested_column,
|
||||
nested_null_map, res, null_map);
|
||||
@ -391,6 +394,10 @@ public:
|
||||
} else if (check_column<ColumnInt64>(nested_column)) {
|
||||
Impl::template vector<ColumnInt64>(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 {}",
|
||||
|
||||
@ -702,3 +702,9 @@ true
|
||||
\N
|
||||
\N
|
||||
|
||||
-- !sql --
|
||||
|
||||
|
||||
-- !sql --
|
||||
|
||||
|
||||
|
||||
@ -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([]));"""
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user