@@ -130,9 +130,10 @@ void BinaryColumnBase<T>::append(const Column& src, size_t offset, size_t count)
130130}
131131
132132template <typename T>
133- __attribute__ ((noinline)) void BinaryColumnBase<T>::_append_selective_general(
134- const BinaryColumnBase<T>& src_column, const uint32_t * indexes, uint32_t size, size_t prev_num_offsets,
135- uint64_t dst_begin) {
133+ __attribute__ ((noinline)) void BinaryColumnBase<T>::_append_selective_general(const BinaryColumnBase<T>& src_column,
134+ const uint32_t * indexes, uint32_t size,
135+ size_t prev_num_offsets,
136+ uint64_t dst_begin) {
136137 auto & bytes = get_bytes ();
137138 const auto & src_offsets = src_column.get_offset ();
138139
@@ -387,8 +388,8 @@ void BinaryColumnBase<T>::append_value_multiple_times(const Column& src, uint32_
387388 for (size_t i = 0 ; i < size; ++i) {
388389 const uint32_t row_idx = index;
389390 const uint64_t row_size = src_offset_data[row_idx + 1 ] - src_offset_data[row_idx];
390- strings::memcpy_inlined (dest_bytes + _offsets[cur_row_count + i],
391- src_bytes + src_offset_data[row_idx], row_size);
391+ strings::memcpy_inlined (dest_bytes + _offsets[cur_row_count + i], src_bytes + src_offset_data[row_idx],
392+ row_size);
392393 }
393394 });
394395
@@ -434,7 +435,6 @@ StatusOr<MutableColumnPtr> BinaryColumnBase<T>::replicate(const Buffer<uint32_t>
434435 pos += bytes_size;
435436 dst_offset_data[j + 1 ] = static_cast <DstValue>(pos);
436437 }
437-
438438 }
439439 });
440440
@@ -850,16 +850,17 @@ void BinaryColumnBase<T>::update_rows(const Column& src, const uint32_t* indexes
850850 auto & bytes = get_bytes ();
851851 auto * dest_bytes = bytes.data ();
852852 const uint8_t * src_bytes = src_column._data_base ();
853- Offsets::visit_storage_pair (dst_offsets_ref, src_offsets_ref, [&](const auto & dst_buf,
854- const auto & src_buf) {
855- const auto * __restrict dst_offsets = dst_buf.data ();
856- const auto * __restrict src_offsets = src_buf.data ();
857- for (size_t i = 0 ; i < replace_num; ++i) {
858- const size_t src_offset = src_offsets[i];
859- const size_t str_size = src_offsets[i + 1 ] - src_offset;
860- strings::memcpy_inlined (dest_bytes + dst_offsets[indexes[i]], src_bytes + src_offset, str_size);
861- }
862- });
853+ Offsets::visit_storage_pair (dst_offsets_ref, src_offsets_ref,
854+ [&](const auto & dst_buf, const auto & src_buf) {
855+ const auto * __restrict dst_offsets = dst_buf.data ();
856+ const auto * __restrict src_offsets = src_buf.data ();
857+ for (size_t i = 0 ; i < replace_num; ++i) {
858+ const size_t src_offset = src_offsets[i];
859+ const size_t str_size = src_offsets[i + 1 ] - src_offset;
860+ strings::memcpy_inlined (dest_bytes + dst_offsets[indexes[i]],
861+ src_bytes + src_offset, str_size);
862+ }
863+ });
863864 return ;
864865 }
865866 }
@@ -968,9 +969,9 @@ size_t BinaryColumnBase<T>::filter_range(const Filter& filter, size_t from, size
968969 // set offsets, try vectorized
969970 for (int i = 0 ; i < batch_nums; ++i) {
970971 // TODO: performance, all sub one same offset ?
971- offset_data[result_offset + i + 1 ] =
972- offset_data[result_offset + i] + offset_data[start_offset + i + 1 ] -
973- offset_data[start_offset + i];
972+ offset_data[result_offset + i + 1 ] = offset_data[result_offset + i] +
973+ offset_data[start_offset + i + 1 ] -
974+ offset_data[start_offset + i];
974975 }
975976
976977 result_offset += batch_nums;
@@ -1156,9 +1157,11 @@ void BinaryColumnBase<T>::deserialize_and_append_batch(Buffer<Slice>& srcs, size
11561157}
11571158
11581159template <typename Offset>
1159- __attribute__ ((noinline)) static void serialize_binary_batch_nullable_impl (
1160- uint8_t * dst, uint32_t * __restrict sizes, size_t chunk_size, uint32_t max_one_row_size,
1161- const uint8_t * __restrict null_masks, const uint8_t * __restrict base, const Offset* __restrict offsets_data) {
1160+ __attribute__ ((noinline)) static void serialize_binary_batch_nullable_impl (uint8_t * dst, uint32_t * __restrict sizes,
1161+ size_t chunk_size, uint32_t max_one_row_size,
1162+ const uint8_t * __restrict null_masks,
1163+ const uint8_t * __restrict base,
1164+ const Offset* __restrict offsets_data) {
11621165 uint8_t * row = dst;
11631166 for (size_t i = 0 ; i < chunk_size; ++i) {
11641167 uint8_t * pos = row + sizes[i];
@@ -1380,9 +1383,8 @@ Status BinaryColumnBase<T>::capacity_limit_reached() const {
13801383 column_name,
13811384 std::to_string (Column::MAX_LARGE_CAPACITY_LIMIT )));
13821385 } else if (_offsets.size () >= Column::MAX_CAPACITY_LIMIT ) {
1383- return Status::CapacityLimitExceed (strings::Substitute (" Total row count of $0 exceed the limit: $1" ,
1384- column_name,
1385- std::to_string (Column::MAX_CAPACITY_LIMIT )));
1386+ return Status::CapacityLimitExceed (strings::Substitute (
1387+ " Total row count of $0 exceed the limit: $1" , column_name, std::to_string (Column::MAX_CAPACITY_LIMIT )));
13861388 }
13871389 return Status::OK ();
13881390}
0 commit comments