mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 23:21:59 +00:00
Backport #68848 to 24.8: Fix empty tuple in array
This commit is contained in:
parent
d2acaba718
commit
06cc6f313c
@ -1598,6 +1598,9 @@ ColumnPtr FunctionArrayElement::executeTuple(const ColumnsWithTypeAndName & argu
|
||||
const auto & tuple_columns = col_nested->getColumns();
|
||||
size_t tuple_size = tuple_columns.size();
|
||||
|
||||
if (tuple_size == 0)
|
||||
return ColumnTuple::create(input_rows_count);
|
||||
|
||||
const DataTypes & tuple_types = typeid_cast<const DataTypeTuple &>(
|
||||
*typeid_cast<const DataTypeArray &>(*arguments[0].type).getNestedType()).getElements();
|
||||
|
||||
|
@ -0,0 +1 @@
|
||||
()
|
1
tests/queries/0_stateless/03229_empty_tuple_in_array.sql
Normal file
1
tests/queries/0_stateless/03229_empty_tuple_in_array.sql
Normal file
@ -0,0 +1 @@
|
||||
select [()][0];
|
Loading…
Reference in New Issue
Block a user