MCPcopy Create free account
hub / github.com/bytedance/bolt / copyImpl

Function copyImpl

bolt/dwio/common/FlatMapHelper.cpp:402–419  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

400
401template <TypeKind K>
402void 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
421template <>
422void copyImpl<TypeKind::BOOLEAN>(

Callers

nothing calls this directly

Calls 3

copyNullsFunction · 0.85
copyFunction · 0.70
rawValuesMethod · 0.45

Tested by

no test coverage detected