Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for MAP type to SQLAlchemy dialect #448

Merged
merged 1 commit into from
Feb 16, 2024

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.

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 cla@trino.io. 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
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 <100126964+dudu-upstream@users.noreply.github.com>
Co-authored-by: Ashhar Hasan <ashhar.hasan@starburstdata.com>
@hashhar hashhar merged commit b8d3360 into trinodb:master Feb 16, 2024
12 checks passed
@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