Skip to content

Conversation

@hashhar
Copy link
Member

@hashhar hashhar commented Feb 3, 2024

Description

Adds support for MAP type to SQLA dialect.
Fixes #397
Supersedes #398

This preserves commit authorship from #398.

Release notes

(x) Release notes are required, with the following suggested text:

* Add support for `MAP` to SQLAlchemy dialect.

@cla-bot
Copy link

cla-bot bot commented Feb 3, 2024

Thank you for your pull request and welcome to the Trino community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. Continue to work with us on the review and improvements in this PR, and submit the signed CLA to [email protected]. Photos, scans, or digitally-signed PDF files are all suitable. Processing may take a few days. The CLA needs to be on file before we merge your changes. For more information, see https://github.com/trinodb/cla

@hashhar hashhar force-pushed the hashhar/sqlalchemy-map branch from bcbbd4e to 42bf347 Compare February 3, 2024 19:19
@cla-bot cla-bot bot added the cla-signed label Feb 3, 2024
@hashhar
Copy link
Member Author

hashhar commented Feb 3, 2024

For what it's worth this may not be complete juding by the JSON impl at ab0e596 and the STRUCT impl in BigQuery at https://github.com/googleapis/python-bigquery-sqlalchemy/blob/main/sqlalchemy_bigquery/_struct.py

Not all operations may work on the type and are out of scope for this pull-request.
Trying to even get this to work (just being able to read and write values correctly) took too much effort.

I had planned to add support for all structural types (ARRAY, MAP and ROW) but I'll leave that to folks who have strong motivation to work with the complex SQLAlchemy API. 😩

Co-authored-by: dudu butbul <[email protected]>
Co-authored-by: Ashhar Hasan <[email protected]>
@hashhar hashhar force-pushed the hashhar/sqlalchemy-map branch from 1ca2a69 to 59c9585 Compare February 3, 2024 19:30
@hashhar hashhar merged commit b8d3360 into trinodb:master Feb 16, 2024
@hashhar hashhar deleted the hashhar/sqlalchemy-map branch February 16, 2024 11:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

Add support for MAP type to SQLAlchemy dialect

2 participants