Skip to content

Commit

Permalink
Disable statement caching for SQLite dialect
Browse files Browse the repository at this point in the history
This doesn't benefit us at all (it's designed to avoid the compilation
overhead when executing the same SQL over and over) and it leads to
warnings when we execute clause elements whose caching behaviour has not
be explicitly defined.

We're getting a warning here now because we've just updated to Trino
v0.328.0 which includes this PR:
 * trinodb/trino-python-client#429

This defines a compiler for the `Lag` clause which (because it is not
restricted to a specific dialect) ends up being used by SQLite and
triggering the warning.
  • Loading branch information
evansd committed Feb 27, 2024
1 parent 62a76d1 commit 58b8561
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ehrql/query_engines/sqlite_dialect.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@


class SQLiteDialect(SQLiteDialect_pysqlite):
supports_statement_cache = True
supports_statement_cache = False

@classmethod
def import_dbapi(cls):
Expand Down

0 comments on commit 58b8561

Please sign in to comment.