[improvement] Change array offset type from UInt32 to UInt64 (#10070)

Now column `Array<T>` contains column `offsets` and `data`, and type of column `offsets` is UInt32 now.
If we call array_union to merge arrays repeatedly, the size of array may overflow.
So we need to extend it before `Array Data Type` release.
This commit is contained in:
camby
2022-06-19 10:24:08 +08:00
committed by GitHub
parent 534844ead6
commit 0e404edf54
22 changed files with 72 additions and 71 deletions

View File

@ -327,7 +327,7 @@ ColumnPtr ColumnVector<T>::replicate(const IColumn::Offsets& offsets) const {
// vectorized this code to speed up
IColumn::Offset counts[size];
for (size_t i = 0; i < size; ++i) {
for (ssize_t i = 0; i < size; ++i) {
counts[i] = offsets[i] - offsets[i - 1];
}