mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 15:12:02 +00:00
Merge pull request #70735 from ClickHouse/backport/24.8/68848
Backport #68848 to 24.8: Fix empty tuple in array
This commit is contained in:
commit
0c5784c3a3
@ -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