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/14 12:15:32 UTC

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

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



##########
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()),

Review comment:
       nit: would it work better to just call the other constructor instead of repeating it here, e.g. `... : TableBatchReader(*table.get()), owned_table_(std::move(table)) {}`

##########
File path: python/pyarrow/table.pxi
##########
@@ -2009,6 +2009,24 @@ cdef class Table(_PandasConvertible):
             result.append(pyarrow_wrap_batch(batch))
 
         return result
+    
+    def to_reader(self):

Review comment:
       Add a quick unit test? Also, add the `max_chunksize` argument like `to_batches`?




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