trinodb / trino-python-client

Python client for Trino
Apache License 2.0
309 stars 151 forks source link

Change experimental_python_types to legacy_primitive_types. Invert lo… #308

Closed damian3031 closed 1 year ago

damian3031 commented 1 year ago

Description

Resolves #305 Change experimental_python_types to legacy_primitive_types. Invert logic behind interpreting this parameter.

Non-technical explanation

Release notes

( ) This is not user-visible or docs only and no release notes are required. ( ) Release notes are required, please propose a release note for me. (x) Release notes are required, with the following suggested text:

* Change experimental_python_types to legacy_primitive_types. Invert logic behind interpreting this parameter. (#305 `issuenumber`)
damian3031 commented 1 year ago

@hashhar would you have some time to look at this PR? Please approve if you are ok with these changes 🙂

damian3031 commented 1 year ago

@hashhar

Do we have any test with legacy_primitive_type=True for values which cannot be represented by Python types...

I've added it here (assertion here)

hashhar commented 1 year ago

Just reworded the commit message.

As a follow-up do you think we should add a table of what Trino types map to what Python types and vice-versa?