Either set supports_statement_cache to True or False
- Dominant language
- Python
- Stars
- 1.7k
- Forks
- 545
- PR merge metrics
- No merged PRs in 30d
Description
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](https://github.com/dropbox/PyHive/blob/master/pyhive/sqlalchemy_hive.py#L249)
**See**: [SQL Compilation Caching](https://docs.sqlalchemy.org/en/14/core/connections.html#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.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.