EnricoMi commented on code in PR #44279:
URL: https://github.com/apache/arrow/pull/44279#discussion_r1800871561


##########
cpp/src/arrow/ipc/reader.cc:
##########
@@ -636,8 +637,12 @@ Result<std::shared_ptr<RecordBatch>> LoadRecordBatchSubset(
                             
arrow::internal::SwapEndianArrayData(filtered_column));
     }
   }
-  return RecordBatch::Make(std::move(filtered_schema), metadata->length(),
-                           std::move(filtered_columns));
+  auto batch = RecordBatch::Make(std::move(filtered_schema), 
metadata->length(),
+    std::move(filtered_columns));
+  if (context.options.ensure_memory_alignment) {
+    return util::EnsureAlignment(batch, arrow::util::kValueAlignment, 
default_memory_pool());

Review Comment:
   Sure! Ideally we should use the buffer's memory manager rather than the 
default CPU manager:
   
https://github.com/apache/arrow/blob/5ad0b3e36f9302c4cf8dd5ab997f30bfab95e2d4/cpp/src/arrow/memory_pool.cc#L907-L916



-- 
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