quanghgx commented on code in PR #13986:
URL: https://github.com/apache/arrow/pull/13986#discussion_r967671730


##########
python/pyarrow/_flight.pyx:
##########
@@ -721,6 +796,28 @@ cdef class SchemaResult(_Weakrefable):
         
check_flight_status(self.result.get().GetSchema(&dummy_memo).Value(&schema))
         return pyarrow_wrap_schema(schema)
 
+    def serialize(self):
+        """Get the wire-format representation of this type.
+
+        Useful when interoperating with non-Flight systems (e.g. REST
+        services) that may want to return Flight types.
+
+        """
+        return GetResultValue(self.result.get().SerializeToString())
+
+    @classmethod
+    def deserialize(cls, serialized):
+        """Parse the wire-format representation of this type.
+
+        Useful when interoperating with non-Flight systems (e.g. REST
+        services) that may want to return Flight types.
+
+        """
+        # cdef SchemaResult result = SchemaResult.__new__(SchemaResult)
+        # result.result.reset(new CSchemaResult(GetResultValue(
+        #     CSchemaResult.Deserialize(tobytes(serialized)))))
+        # return result

Review Comment:
   Fixed, add default constructor for SchemaResult on C++



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