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

UUID in a query gets garbled #492

Closed
sevanteri opened this issue Nov 13, 2023 · 3 comments
Closed

UUID in a query gets garbled #492

sevanteri opened this issue Nov 13, 2023 · 3 comments

Comments

@sevanteri
Copy link

Just upgraded from 3.0.8 to 3.0.10 and it seems handling UUIDs broke.

[ins] In [1]: from pyathena.sqlalchemy.base import AthenaDialect

[ins] In [2]: import sqlalchemy as SQA

[ins] In [3]: import uuid

[ins] In [4]: query = SQA.select(SQA.literal(uuid.UUID(int=0)))

[ins] In [5]: str(query.compile(dialect=AthenaDialect(), compile_kwargs={"literal_binds": True}))
Out[5]: "SELECT '00000000000000000000000000000000' AS anon_1"
@laughingman7743
Copy link
Owner

v3.0.8...v3.0.10
Is there any change that might be related to this? 🤔
It may be a different version of SQLAlchemy. I need more information to investigate.

@sevanteri
Copy link
Author

Hmmh... could also be SQLAlchemy. Just checked and we also upgraded that.

Seems like at least mysql and sqlite dialects do the same thing. Postgresql dialect doesn't.

@sevanteri
Copy link
Author

Okay this is clearly not an issue in pyAthena but somewhere in SQLAlchemy, or my brain. I'll just close this, at least for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants