aboutsummaryrefslogtreecommitdiffstats
path: root/yql/essentials/public/udf/arrow/util.cpp
diff options
context:
space:
mode:
authorziganshinmr <ziganshinmr@yandex-team.com>2025-01-10 17:23:43 +0300
committerziganshinmr <ziganshinmr@yandex-team.com>2025-01-10 17:39:29 +0300
commitf3443af4eb64d5b450497b61625932d66a27dfc8 (patch)
tree3559af21c163f1a2ef04a21fcbb94b2ca0bc0b20 /yql/essentials/public/udf/arrow/util.cpp
parent9729f7ea47301feb1fa702b0aa3ab98198c5e3a2 (diff)
downloadydb-f3443af4eb64d5b450497b61625932d66a27dfc8.tar.gz
Block trimmer and its usage in BlockMapJoinCore
commit_hash:568373541db82f01bd26ce36651f8dbb92a007e1
Diffstat (limited to 'yql/essentials/public/udf/arrow/util.cpp')
-rw-r--r--yql/essentials/public/udf/arrow/util.cpp12
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 55a728207b..b36b4f9ce5 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);