Skip to content

Commit 8694e22

Browse files
Backport #87520 to 25.9: Fix creating an array of empty tuples
1 parent fa1c0dc commit 8694e22

3 files changed

Lines changed: 5 additions & 1 deletion

File tree

src/Functions/tuple.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ class FunctionTuple : public IFunction
6666
ColumnPtr executeImpl(const ColumnsWithTypeAndName & arguments, const DataTypePtr &, size_t input_rows_count) const override
6767
{
6868
if (arguments.empty())
69-
return ColumnTuple::create(input_rows_count);
69+
return DataTypeTuple({}).createColumnConstWithDefaultValue(input_rows_count);
7070

7171
size_t tuple_size = arguments.size();
7272
Columns tuple_columns(tuple_size);
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[(),()]
2+
[(),()]
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
select [(), ()] from numbers(2);
2+

0 commit comments

Comments
 (0)