This commit is contained in:
Alexey Milovidov 2018-12-23 04:46:30 +03:00
parent 83cf88c9c1
commit 19d57c78b5
2 changed files with 8 additions and 0 deletions

View File

@ -320,6 +320,13 @@ bool ColumnArray::hasEqualOffsets(const ColumnArray & other) const
}
ColumnPtr ColumnArray::convertToFullColumnIfConst() const
{
/// It is possible to have an array with constant data and non-constant offsets.
/// Example is the result of expression: replicate('hello', [1])
return ColumnArray::create(data->convertToFullColumnIfConst(), offsets);
}
void ColumnArray::getExtremes(Field & min, Field & max) const
{
min = Array();

View File

@ -79,6 +79,7 @@ public:
size_t byteSize() const override;
size_t allocatedBytes() const override;
ColumnPtr replicate(const Offsets & replicate_offsets) const override;
ColumnPtr convertToFullColumnIfConst() const override;
void getExtremes(Field & min, Field & max) const override;
bool hasEqualOffsets(const ColumnArray & other) const;