msyavuz commented on code in PR #43233:
URL: https://github.com/apache/superset/pull/43233#discussion_r3978532932


##########
superset/connectors/sqla/models.py:
##########
@@ -1483,6 +1559,7 @@ class SqlaTable(
             "owners",
             "editors",
             "row_level_security_filters",
+            "filters",

Review Comment:
   SqlMetric and TableColumn are Continuum-versioned; excluding `filters` here 
with no `__versioned__` on SqlFilter means restoring an older dataset version 
rolls back metrics and columns but leaves filters untouched. Intentional? If 
filters should be versioned, that's a shadow table in this migration plus purge 
policy and `superset/versioning/` updates, and it belongs in this PR.



##########
superset/migrations/versions/2026-08-16_17-20_c9e4a7b1d2f3_add_sql_filters.py:
##########
@@ -0,0 +1,84 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+"""add_sql_filters
+
+Revision ID: c9e4a7b1d2f3
+Revises: 1072de5ed955
+Create Date: 2026-08-16 17:20:00.000000
+
+"""
+
+from sqlalchemy import (
+    Column,
+    DateTime,
+    ForeignKeyConstraint,
+    Integer,
+    String,
+    Text,
+    UniqueConstraint,
+)
+from sqlalchemy_utils import UUIDType
+
+from superset.migrations.shared.utils import create_table, drop_table
+from superset.utils.core import MediumText
+
+# revision identifiers, used by Alembic.
+revision = "c9e4a7b1d2f3"
+down_revision = "1072de5ed955"

Review Comment:
   Stale: `39097d124752` on master already revises `1072de5ed955` and the head 
is now `7e2c9a4f1b83`, so this adds a second Alembic head and the single-head 
check will fail.



##########
superset/connectors/sqla/models.py:
##########
@@ -1459,8 +1527,16 @@ class SqlaTable(
         cascade_backrefs=False,
         passive_deletes=True,
     )
+    filters: Mapped[list[SqlFilter]] = relationship(
+        SqlFilter,
+        back_populates="table",
+        cascade="all, delete-orphan",
+        cascade_backrefs=False,
+        passive_deletes=True,
+    )
     metric_class = SqlMetric
     column_class = TableColumn
+    filter_class = SqlFilter

Review Comment:
   `metric_class`/`column_class` have zero references anywhere in `superset/` 
or `tests/`, and neither #43234 nor #43235 reads `filter_class`. Drop it.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to