Skip to content

Commit 755fc1e

Browse files
Backport ClickHouse#87520 to 25.8: Fix creating an array of empty tuples
1 parent d63f45b commit 755fc1e

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

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)