Skip to content
This repository was archived by the owner on May 5, 2022. It is now read-only.
This repository was archived by the owner on May 5, 2022. It is now read-only.

TrinoDialect should set if it supports statement cache #44

Open
@mbacovsky

Description

@mbacovsky

Hello,

Since SQLAlchemy 1.4.5 it is required from third party dialects to set whether they comply with statement cache with supports_statement_cache attribute. More details in the docs.

If the attribute is not set the warnings like

lib/python3.8/site-packages/sqlalchemy_trino/dialect.py:259: SAWarning: Dialect trino:rest 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)

are raised.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions