Fix segfault in function "replicate"

This commit is contained in:
Alexey Milovidov 2019-03-06 02:37:41 +03:00
parent 899b2548c7
commit fb8e37f60f
3 changed files with 3 additions and 1 deletions

View File

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

View File

@ -0,0 +1 @@
[[\'a\']]

View File

@ -0,0 +1 @@
SELECT CAST(replicate(['a'], [1]) AS String);