bkietz commented on a change in pull request #7026: URL: https://github.com/apache/arrow/pull/7026#discussion_r416758776
########## File path: python/pyarrow/_dataset.pyx ########## @@ -41,6 +42,167 @@ def _forbid_instantiation(klass, subclasses_instead=True): raise TypeError(msg) +cdef class Expression: + + cdef: + shared_ptr[CExpression] wrapped + CExpression* expr + + def __init__(self, Buffer buffer=None): + if buffer is not None: + c_buffer = pyarrow_unwrap_buffer(buffer) + expr = GetResultValue(CExpression.Deserialize(deref(c_buffer))) + self.init(expr) Review comment: This would definitely be better but it gives me an error like ``` E _pickle.PicklingError: Can't pickle <built-in function _deserialize>: attribute lookup _deserialize on pyarrow._dataset failed ``` I'll permute until this works. ---------------------------------------------------------------- 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: us...@infra.apache.org