mapleFU commented on code in PR #44822:
URL: https://github.com/apache/arrow/pull/44822#discussion_r1963871279


##########
cpp/src/arrow/compute/kernels/scalar_cast_string.cc:
##########
@@ -46,6 +46,25 @@ namespace internal {
 
 namespace {
 
+Result<std::shared_ptr<Buffer>> GetOrCopyNullBitmapBuffer(const ArraySpan& 
in_array,
+                                                          MemoryPool* pool) {
+  if (in_array.buffers[0].data == nullptr) {
+    return nullptr;
+  }
+
+  if (in_array.offset == 0) {
+    return in_array.GetBuffer(0);
+  }
+
+  if (in_array.offset % 8 == 0) {

Review Comment:
   Add a SliceBuffer



##########
cpp/src/arrow/compute/kernels/scalar_cast_string.cc:
##########
@@ -46,6 +46,25 @@ namespace internal {
 
 namespace {
 
+Result<std::shared_ptr<Buffer>> GetOrCopyNullBitmapBuffer(const ArraySpan& 
in_array,

Review Comment:
   scalar_cast_nested.cc also has same name, should I extract it or just do 
like this?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to