mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 00:22:29 +00:00
dbms: fixed writing arrays [#CONV-8022].
This commit is contained in:
parent
23046fe1fe
commit
4bc51482ce
@ -47,9 +47,9 @@ void DataTypeArray::serializeBinary(const IColumn & column, WriteBuffer & ostr,
|
|||||||
const ColumnArray & column_array = dynamic_cast<const ColumnArray &>(column);
|
const ColumnArray & column_array = dynamic_cast<const ColumnArray &>(column);
|
||||||
const ColumnArray::Offsets_t & offsets = column_array.getOffsets();
|
const ColumnArray::Offsets_t & offsets = column_array.getOffsets();
|
||||||
|
|
||||||
size_t nested_offset = offset ? offsets[offset] : 0;
|
size_t nested_offset = offset ? offsets[offset - 1] : 0;
|
||||||
size_t nested_limit = limit && offset + limit < offsets.size()
|
size_t nested_limit = limit && (offset + limit < offsets.size())
|
||||||
? offsets[offset + limit] - nested_offset
|
? offsets[offset + limit - 1] - nested_offset
|
||||||
: 0;
|
: 0;
|
||||||
|
|
||||||
nested->serializeBinary(column_array.getData(), ostr, nested_offset, nested_limit);
|
nested->serializeBinary(column_array.getData(), ostr, nested_offset, nested_limit);
|
||||||
|
Loading…
Reference in New Issue
Block a user