You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by je...@apache.org on 2024/04/26 23:00:39 UTC

(airflow) 23/48: Add `inherit_cache` attribute for `CreateTableAs` custom SA Clause (#38985)

This is an automated email from the ASF dual-hosted git repository.

jedcunningham pushed a commit to branch v2-9-test
in repository https://gitbox.apache.org/repos/asf/airflow.git

commit 82a1b6abdeeb225b75f53fcfa9d74ba258a4aee9
Author: Andrey Anshin <An...@taragol.is>
AuthorDate: Sun Apr 14 17:19:17 2024 +0400

    Add `inherit_cache` attribute for `CreateTableAs` custom SA Clause (#38985)
    
    (cherry picked from commit bdb8f749ee462d508bc9da43b16d18a599ff0e7b)
---
 airflow/utils/db_cleanup.py | 2 ++
 pyproject.toml              | 1 +
 2 files changed, 3 insertions(+)

diff --git a/airflow/utils/db_cleanup.py b/airflow/utils/db_cleanup.py
index 4475209b77..7fe158e605 100644
--- a/airflow/utils/db_cleanup.py
+++ b/airflow/utils/db_cleanup.py
@@ -218,6 +218,8 @@ def _subquery_keep_last(*, recency_column, keep_last_filters, group_by_columns,
 class CreateTableAs(Executable, ClauseElement):
     """Custom sqlalchemy clause element for CTAS operations."""
 
+    inherit_cache = False
+
     def __init__(self, name, query):
         self.name = name
         self.query = query
diff --git a/pyproject.toml b/pyproject.toml
index fbc7b7a9d7..4107396af3 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -482,6 +482,7 @@ filterwarnings = [
     # Avoid building cartesian product which might impact performance
     "error:SELECT statement has a cartesian product between FROM:sqlalchemy.exc.SAWarning:airflow",
     'error:Coercing Subquery object into a select\(\) for use in IN\(\):sqlalchemy.exc.SAWarning:airflow',
+    'error:Class.*will not make use of SQL compilation caching',
     "ignore::DeprecationWarning:flask_appbuilder.filemanager",
     "ignore::DeprecationWarning:flask_appbuilder.widgets",
     # https://github.com/dpgaspar/Flask-AppBuilder/pull/1940