-
-
Notifications
You must be signed in to change notification settings - Fork 116
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
'inherit_cache' attribute warning when executing a query #276
Comments
The caching failure is caused by the changes in 16fa7b3 which result in a unhashable dict stored in |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
To Reproduce
In database:
Code:
This gives the following warning:
SAWarning: Class Select will not make use of SQL compilation caching as it does not set the 'inherit_cache' attribute to
True
. This can have significant performance implications including some performance degradations in comparison to prior SQLAlchemy versions. Set this attribute to True if this object can make use of the cache key generated by the superclass. Alternatively, this attribute may be set to False which will disable this warning. (Background on this warning at: https://sqlalche.me/e/20/cprf)If I set the attribute on our Select object:
clickhouse-sqlalchemy/clickhouse_sqlalchemy/sql/selectable.py
Line 84 in a5390b9
to select.inherit_cache = False, the warning disappears but we don't use the cache
If I set it to True we get a an error and would be nice if we could use the caching mechanism:
If we can't use the cache, we should set it to false to get rid of the warning.
Versions
Clickhouse: 23.7.1.2470
Sqlalchemy: 2.0.23
clickhouse-sqlalchemy: 0.3.0
The text was updated successfully, but these errors were encountered: