You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by ru...@apache.org on 2026/07/21 16:43:22 UTC
(superset) branch fix-jinja-orderby-test-session created (now cc6a5e61c4c)
This is an automated email from the ASF dual-hosted git repository.
rusackas pushed a change to branch fix-jinja-orderby-test-session
in repository https://gitbox.apache.org/repos/asf/superset.git
at cc6a5e61c4c test(sqla): add the jinja orderby calculated column to the session
This branch includes the following new commits:
new cc6a5e61c4c test(sqla): add the jinja orderby calculated column to the session
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
(superset) 01/01: test(sqla): add the jinja orderby calculated column to the session
Posted by ru...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rusackas pushed a commit to branch fix-jinja-orderby-test-session
in repository https://gitbox.apache.org/repos/asf/superset.git
commit cc6a5e61c4c9ec594f803eb3d16e83e92938feba
Author: Claude Code <no...@anthropic.com>
AuthorDate: Tue Jul 21 09:43:10 2026 -0700
test(sqla): add the jinja orderby calculated column to the session
#41870 added test_jinja_calculated_column_in_order_by, which builds a
TableColumn(table=table) and relies on backref cascading to keep it in
table.columns. #42222 (merged the same day, after #41870's CI ran) set
cascade_backrefs=False on that relationship, so the unadded column is
lost on expiry and the orderby falls back to the bare column name,
failing the test on every DB variant on master. Register the column
with the session explicitly, matching the sibling
test_calculated_column_in_order_by_base_engine_spec that #42222 itself
updated the same way.
Co-Authored-By: Claude Fable 5 <no...@anthropic.com>
---
tests/integration_tests/db_engine_specs/base_engine_spec_tests.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/tests/integration_tests/db_engine_specs/base_engine_spec_tests.py b/tests/integration_tests/db_engine_specs/base_engine_spec_tests.py
index 8ffbaba0701..ec9ad2dd44f 100644
--- a/tests/integration_tests/db_engine_specs/base_engine_spec_tests.py
+++ b/tests/integration_tests/db_engine_specs/base_engine_spec_tests.py
@@ -214,7 +214,7 @@ class SupersetTestCases(SupersetTestCase):
SELECT/WHERE/GROUP BY.
"""
table = self.get_table(name="birth_names")
- TableColumn(
+ column = TableColumn(
column_name="gender_cc_jinja",
type="VARCHAR(255)",
table=table,
@@ -225,6 +225,7 @@ class SupersetTestCases(SupersetTestCase):
end
""",
)
+ db.session.add(column)
table.database.sqlalchemy_uri = "sqlite://"
query_obj: QueryObjectDict = {