PyHive icon indicating copy to clipboard operation
PyHive copied to clipboard

Either set supports_statement_cache to True or False

Open ebarault opened this issue 3 years ago • 5 comments

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.

ebarault avatar Apr 26 '22 13:04 ebarault

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

ADITYADAS1999 avatar Nov 29 '22 12:11 ADITYADAS1999

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

ebarault avatar Nov 29 '22 14:11 ebarault

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 ?

ADITYADAS1999 avatar Nov 29 '22 15:11 ADITYADAS1999

This is addressed in master as of now.

mdeshmu avatar Jul 14 '23 15:07 mdeshmu