trinodb / trinodb/trino-python-client
Add ability to return MAP type columns with ARRAY, MAP or ROW keys
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 439
- Forks
- 206
- PR merge metrics
- No merged PRs in 30d
Description
Describe the feature
Today the Python client fails with an error when returning MAP columns with ARRAY, MAP or ROW keys.
See the tests added in https://github.com/trinodb/trino-python-client/pull/441 for the behavior.
Describe alternatives you've considered
Using legacy_primitive_types=True is able to return the data but in a non-standard format and requires user to reverse-engineer how Trino serialized the column.
Note that the JDBC driver doesn't work with such columns either at the moment.
Are you willing to submit PR?
- Yes I am willing to submit a PR!
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the behavior tests added in trinodb/trino-python-client pull request 441, then trace the Python client's handling of MAP, ARRAY, and ROW column values. Reproduce the failure with MAP columns using complex keys and compare it with legacy_primitive_types=True. Done means these columns return standard Python values without requiring callers to reverse-engineer Trino's serialization.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- databases
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100