jorisvandenbossche commented on code in PR #456:
URL: https://github.com/apache/arrow-nanoarrow/pull/456#discussion_r1594131088


##########
python/src/nanoarrow/_lib.pyx:
##########
@@ -769,6 +769,35 @@ cdef class CSchema:
     def __repr__(self):
         return _repr_utils.schema_repr(self)
 
+    def type_equals(self, CSchema other):
+        self._assert_valid()
+
+        if self._ptr == other._ptr:
+            return True
+
+        if self.format != other.format:
+            return False
+
+        if self.flags != other.flags:
+            return False
+

Review Comment:
   Should we check field metadata as well?  (or behind an option) 
   
   (if you check flags, it feels to me that metadata should be checked as well)



##########
python/src/nanoarrow/_lib.pyx:
##########
@@ -874,6 +903,22 @@ cdef class CSchema:
 
         return builder.finish()
 
+    @staticmethod
+    def assert_type_equal(actual, expected):

Review Comment:
   I would personally move that to a standalone function instead of a static 
method (just for consistency, all other python packages that I know that 
provide this assert helpers do it that way)



##########
python/src/nanoarrow/array.py:
##########
@@ -161,6 +163,27 @@ def __init__(self, obj, schema=None, device=None) -> None:
         with c_array_stream(obj, schema=schema) as stream:
             self._data = CMaterializedArrayStream.from_c_array_stream(stream)
 
+    @staticmethod
+    def from_chunks(obj, schema=None, validate=True):

Review Comment:
   Can you add a docstring here?



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