mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-25 09:02:00 +00:00
Merge pull request #34475 from DevTeamBK/nested_column
accessing nested_column after already moved to data
This commit is contained in:
commit
309af64475
@ -50,12 +50,12 @@ ColumnArray::ColumnArray(MutableColumnPtr && nested_column, MutableColumnPtr &&
|
||||
if (!offsets_concrete)
|
||||
throw Exception("offsets_column must be a ColumnUInt64", ErrorCodes::LOGICAL_ERROR);
|
||||
|
||||
if (!offsets_concrete->empty() && nested_column)
|
||||
if (!offsets_concrete->empty() && data)
|
||||
{
|
||||
Offset last_offset = offsets_concrete->getData().back();
|
||||
|
||||
/// This will also prevent possible overflow in offset.
|
||||
if (nested_column->size() != last_offset)
|
||||
if (data->size() != last_offset)
|
||||
throw Exception("offsets_column has data inconsistent with nested_column", ErrorCodes::LOGICAL_ERROR);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user