mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 15:12:02 +00:00
Fix segfault in function "replicate"
This commit is contained in:
parent
899b2548c7
commit
fb8e37f60f
@ -54,7 +54,7 @@ public:
|
||||
array_column = checkAndGetColumn<ColumnArray>(temp_column.get());
|
||||
}
|
||||
block.getByPosition(result).column
|
||||
= ColumnArray::create(first_column->replicate(array_column->getOffsets()), array_column->getOffsetsPtr());
|
||||
= ColumnArray::create(first_column->replicate(array_column->getOffsets())->convertToFullColumnIfConst(), array_column->getOffsetsPtr());
|
||||
}
|
||||
};
|
||||
|
||||
|
1
dbms/tests/queries/0_stateless/00914_replicate.reference
Normal file
1
dbms/tests/queries/0_stateless/00914_replicate.reference
Normal file
@ -0,0 +1 @@
|
||||
[[\'a\']]
|
1
dbms/tests/queries/0_stateless/00914_replicate.sql
Normal file
1
dbms/tests/queries/0_stateless/00914_replicate.sql
Normal file
@ -0,0 +1 @@
|
||||
SELECT CAST(replicate(['a'], [1]) AS String);
|
Loading…
Reference in New Issue
Block a user