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 2020/10/05 13:47:26 UTC

[GitHub] [arrow] pitrou commented on a change in pull request #8317: ARROW-10134: [Python][Dataset] Add ParquetFileFragment.num_row_groups

pitrou commented on a change in pull request #8317:
URL: https://github.com/apache/arrow/pull/8317#discussion_r499611181



##########
File path: python/pyarrow/_dataset.pyx
##########
@@ -962,6 +962,10 @@ cdef class ParquetFileFragment(FileFragment):
             return None
         return [RowGroupInfo.wrap(row_group) for row_group in c_row_groups]
 
+    @property
+    def num_row_groups(self):
+        return None if self.row_groups is None else len(self.row_groups)

Review comment:
       Is there a way to do this without reifying `self.row_groups`? Or is it cheap enough?




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

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