bkietz commented on a change in pull request #8507:
URL: https://github.com/apache/arrow/pull/8507#discussion_r512773844
##########
File path: python/pyarrow/_dataset.pyx
##########
@@ -907,66 +908,61 @@ cdef class FileFragment(Fragment):
return FileFormat.wrap(self.file_fragment.format())
-cdef class RowGroupInfo(_Weakrefable):
+class RowGroupInfo:
"""A wrapper class for RowGroup information"""
- cdef:
- CRowGroupInfo info
-
- def __init__(self, int id):
- cdef CRowGroupInfo info = CRowGroupInfo(id)
- self.init(info)
-
- cdef void init(self, CRowGroupInfo info):
- self.info = info
-
- @staticmethod
- cdef wrap(CRowGroupInfo info):
- cdef RowGroupInfo self = RowGroupInfo.__new__(RowGroupInfo)
- self.init(info)
- return self
-
- @property
- def id(self):
- return self.info.id()
+ def __init__(self, id, metadata=None, schema=None):
+ self.id = id
+ self.metadata = metadata
+ self.schema = schema
@property
def num_rows(self):
- return self.info.num_rows()
+ if self.metadata is None:
+ return None
Review comment:
I'll delete 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.
For queries about this service, please contact Infrastructure at:
[email protected]