diff options
author | Alexander Smirnov <[email protected]> | 2025-01-11 00:21:49 +0000 |
---|---|---|
committer | Alexander Smirnov <[email protected]> | 2025-01-11 00:21:49 +0000 |
commit | 457aacf7daabd8837feef98d1edcfe62420a1f47 (patch) | |
tree | 3f8ca7735aac2ab4574833bf4ea5e1881a02ef84 /yql/essentials/public/udf/arrow/util.cpp | |
parent | af411bb10f1133d6e7f4c6324a89dde2f745d675 (diff) | |
parent | 2d3b7f1966f9716551a0d7db72a9608addab8ecf (diff) |
Merge branch 'rightlib' into merge-libs-250111-0020
Diffstat (limited to 'yql/essentials/public/udf/arrow/util.cpp')
-rw-r--r-- | yql/essentials/public/udf/arrow/util.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/yql/essentials/public/udf/arrow/util.cpp b/yql/essentials/public/udf/arrow/util.cpp index 55a728207b2..b36b4f9ce51 100644 --- a/yql/essentials/public/udf/arrow/util.cpp +++ b/yql/essentials/public/udf/arrow/util.cpp @@ -68,6 +68,18 @@ std::shared_ptr<arrow::Buffer> MakeDenseBitmapNegate(const ui8* srcSparse, size_ return bitmap; } +std::shared_ptr<arrow::Buffer> MakeDenseBitmapCopy(const ui8* src, size_t len, size_t offset, arrow::MemoryPool* pool) { + auto bitmap = AllocateBitmapWithReserve(len, pool); + CopyDenseBitmap(bitmap->mutable_data(), src, offset, len); + return bitmap; +} + +std::shared_ptr<arrow::Buffer> MakeDenseFalseBitmap(int64_t len, arrow::MemoryPool* pool) { + auto bitmap = AllocateBitmapWithReserve(len, pool); + std::memset(bitmap->mutable_data(), 0, bitmap->size()); + return bitmap; +} + std::shared_ptr<arrow::ArrayData> DeepSlice(const std::shared_ptr<arrow::ArrayData>& data, size_t offset, size_t len) { Y_ENSURE(data->length >= 0); Y_ENSURE(offset + len <= (size_t)data->length); |