You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/03/15 14:47:56 UTC

[GitHub] [arrow] philix commented on a change in pull request #12621: ARROW-15823: [Python] Add a method to convert a Table to a RecordBatchReader

philix commented on a change in pull request #12621:
URL: https://github.com/apache/arrow/pull/12621#discussion_r827062781



##########
File path: cpp/src/arrow/table.cc
##########
@@ -601,6 +602,19 @@ TableBatchReader::TableBatchReader(const Table& table)
   }
 }
 
+TableBatchReader::TableBatchReader(std::shared_ptr<Table> table)
+    : table_(*table.get()),
+      owned_table_(std::move(table)),

Review comment:
       This should probably be declared before `table_` since `table_` is `*owned_table_`. It doesn't matter much now, but if another member that takes `Table &` were to be introduced here, it would have a `Table &` pointing to freed memory when everything is destroyed.




-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org