mirror of
https://github.com/apache/superset.git
synced 2026-04-25 02:55:07 +00:00
fix(tests): one of integration test in TestSqlaTableModel does not support MySQL "concat" (#35007)
Co-authored-by: Mehmet Salih Yavuz <salih.yavuz@proton.me>
This commit is contained in:
@@ -448,11 +448,14 @@ class TestSqlaTableModel(SupersetTestCase):
|
|||||||
return None
|
return None
|
||||||
old_inner_join = spec.allows_joins
|
old_inner_join = spec.allows_joins
|
||||||
spec.allows_joins = inner_join
|
spec.allows_joins = inner_join
|
||||||
|
|
||||||
|
# Use database-specific string concatenation syntax
|
||||||
arbitrary_gby = (
|
arbitrary_gby = (
|
||||||
"state OR gender OR '_test'"
|
"CONCAT(state, gender, '_test')"
|
||||||
if get_example_database().backend == "mysql"
|
if get_example_database().backend == "mysql"
|
||||||
else "state || gender || '_test'"
|
else "state || gender || '_test'"
|
||||||
)
|
)
|
||||||
|
|
||||||
arbitrary_metric = dict( # noqa: C408
|
arbitrary_metric = dict( # noqa: C408
|
||||||
label="arbitrary", expressionType="SQL", sqlExpression="SUM(num_boys)"
|
label="arbitrary", expressionType="SQL", sqlExpression="SUM(num_boys)"
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user