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

Either set supports_statement_cache to True or False #437

Open
ebarault opened this issue Apr 26, 2022 · 4 comments
Open

Either set supports_statement_cache to True or False #437

ebarault opened this issue Apr 26, 2022 · 4 comments

Comments

@ebarault
Copy link

ebarault commented Apr 26, 2022

Hi,

I'm getting this warning when using the dialect with sqlalchemy : 1.4+

SAWarning: Dialect databricks:connector will not make use of SQL compilation caching as it does not set the 'supports_statement_cache' attribute to True. This can have significant performance implications including some performance degradations in comparison to prior SQLAlchemy versions. Dialect maintainers should seek to set this attribute to True after appropriate development and testing for SQLAlchemy 1.4 caching support. Alternatively, this attribute may be set to False which will disable this warning. (Background on this error at: https://sqlalche.me/e/14/cprf)

This should be solved by either setting s to True or False (depending of the actual support) somewhere along those lines

See: SQL Compilation Caching

New in version 1.4: SQLAlchemy now has a transparent query caching system that substantially lowers the Python computational overhead involved in converting SQL statement constructs into SQL strings across both Core and ORM.

@ADITYADAS1999
Copy link

Hi @ebarault
This issue still open to work. If this, I can fixed this one?😊

@ebarault
Copy link
Author

sure @ADITYADAS1999, I was more raising this issue to the maintainer of this repo, but happy if you can give it a go

@ADITYADAS1999
Copy link

sure @ADITYADAS1999, I was more raising this issue to the maintainer of this repo, but happy if you can give it a go

Thank you ebarault

So all the changes should be made in this file right ?

@mdeshmu
Copy link
Contributor

mdeshmu commented Jul 14, 2023

This is addressed in master as of 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

3 participants