From 9efb80dbf4a07a5272b22ae4ea5684d3ba535b9f Mon Sep 17 00:00:00 2001 From: catpineapple Date: Sat, 6 Sep 2025 02:11:38 +0800 Subject: [PATCH] fix(tests): one of integration test in TestSqlaTableModel does not support MySQL "concat" (#35007) Co-authored-by: Mehmet Salih Yavuz --- tests/integration_tests/model_tests.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/integration_tests/model_tests.py b/tests/integration_tests/model_tests.py index cf4c96fac6e..e80fea7db88 100644 --- a/tests/integration_tests/model_tests.py +++ b/tests/integration_tests/model_tests.py @@ -448,11 +448,14 @@ class TestSqlaTableModel(SupersetTestCase): return None old_inner_join = spec.allows_joins spec.allows_joins = inner_join + + # Use database-specific string concatenation syntax arbitrary_gby = ( - "state OR gender OR '_test'" + "CONCAT(state, gender, '_test')" if get_example_database().backend == "mysql" else "state || gender || '_test'" ) + arbitrary_metric = dict( # noqa: C408 label="arbitrary", expressionType="SQL", sqlExpression="SUM(num_boys)" )