| 400 | |
| 401 | template <TypeKind K> |
| 402 | void copyImpl( |
| 403 | const TypePtr& /* type */, |
| 404 | BaseVector& target, |
| 405 | vector_size_t targetIndex, |
| 406 | const BaseVector& source, |
| 407 | vector_size_t sourceIndex, |
| 408 | vector_size_t count) { |
| 409 | // copy values if not all are nulls |
| 410 | if (copyNulls(target, targetIndex, source, sourceIndex, count) != count) { |
| 411 | using NativeType = typename bolt::TypeTraits<K>::NativeType; |
| 412 | auto& tgt = static_cast<FlatVector<NativeType>&>(target); |
| 413 | auto& src = static_cast<const FlatVector<NativeType>&>(source); |
| 414 | std::copy( |
| 415 | src.rawValues() + sourceIndex, |
| 416 | src.rawValues() + sourceIndex + count, |
| 417 | const_cast<NativeType*>(tgt.rawValues()) + targetIndex); |
| 418 | } |
| 419 | } |
| 420 | |
| 421 | template <> |
| 422 | void copyImpl<TypeKind::BOOLEAN>( |