-
Notifications
You must be signed in to change notification settings - Fork 201
Closed
Description
Expected behavior
The custom type NamedRowTuple does not implement the methods necessary for a successful pickle roundtrip. When unpickling (pickle.load[s]) it raises a TypeError.
It should work with pickle.
Some frameworks, for example https://github.com/streamlit/streamlit rely on pickling results/rows for caching which currently fails when using this library.
Actual behavior
Exception when calling pickle.load[s]:
TypeError: NamedRowTuple.__new__() missing 2 required positional arguments: 'names' and 'types'
Steps To Reproduce
import pickle
from trino import types
pickle.loads(pickle.dumps(types.NamedRowTuple(["Alice", 38], ["name", "age"], ["varchar", "integer"])))Log output
No response
Operating System
Linux
Trino Python client version
Trino Server version
461
Python version
Python 3.12.5
Are you willing to submit PR?
- Yes I am willing to submit a PR!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels