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


##########
tests/integration_tests/model_tests.py:
##########
@@ -448,11 +448,15 @@ def query_with_expr_helper(self, is_timeseries, 
inner_join=True):
             return None
         old_inner_join = spec.allows_joins
         spec.allows_joins = inner_join
-        arbitrary_gby = (
-            "state OR gender OR '_test'"
-            if get_example_database().backend == "mysql"
-            else "state || gender || '_test'"
-        )
+
+        # Use database-specific string concatenation syntax
+        database = self.get_database_by_id(tbl.database_id)
+        if database.backend == "mysql":
+            arbitrary_gby = "CONCAT(state, gender, '_test')"
+        else:
+            # Use PostgreSQL/SQLite style for other databases
+            arbitrary_gby = "state || gender || '_test'"

Review Comment:
   Can't we just do:
   ```suggestion
           arbitrary_gby = (
               "CONCAT(state, gender, '_test')"
               if get_example_database().backend == "mysql"
               else "state || gender || '_test'"
           )
   ```
   
   Also great catch! How did you find this out?



-- 
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: notifications-unsubscr...@superset.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org

Reply via email to