trinodb / trino-python-client

Python client for Trino
Apache License 2.0
307 stars 150 forks source link

Add ability to return MAP type columns with ARRAY, MAP or ROW keys #442

Open hashhar opened 5 months ago

hashhar commented 5 months ago

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?