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:
robot-ch-test-poll4 2024-10-16 15:15:21 +02:00 committed by GitHub
commit 0c5784c3a3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 5 additions and 0 deletions

View File

@ -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();

View File

@ -0,0 +1 @@
()

View File

@ -0,0 +1 @@
select [()][0];