grobgl opened a new issue, #7644:
URL: https://github.com/apache/iceberg/issues/7644

   ### Feature Request / Improvement
   
   Right now, various classes in PyIceberg cannot be pickled. This is due 
`__new__` lacking a corresponding `__getnewargs__` in various places ([pickle 
docs](https://docs.python.org/3/library/pickle.html#object.__getnewargs__)). 
Pickle support is required by, e.g., Dask to serialise tasks as they are 
distributed to workers.
   
   Here is a simple example:
   ```python
   import pickle
   from pyiceberg.expressions import And, EqualTo
   
   ex = And(EqualTo('name', 'test'), EqualTo('value', 0))
   pickle.loads(pickle.dumps(ex))
   ```
   
   This results in the following exception:
   ```
   Traceback (most recent call last):
     File "<stdin>", line 1, in <module>
   TypeError: And.__new__() missing 2 required positional arguments: 'left' and 
'right'
   ```
   
   I'm happy to provide a fix, but I'd like to hear your thoughts first.
   
   ### Query engine
   
   Other


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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to