bkyryliuk commented on a change in pull request #10498:
URL: 
https://github.com/apache/incubator-superset/pull/10498#discussion_r466584068



##########
File path: tests/celery_tests.py
##########
@@ -174,8 +177,23 @@ def test_run_sync_query_cta(self, ctas_method):
         )
         # provide better error message
         self.assertEqual(QueryStatus.SUCCESS, result["query"]["state"], 
msg=result)
-        self.assertEqual([], result["data"])
-        self.assertEqual([], result["columns"])
+
+        expected_result = []
+        if backend == "presto":
+            expected_result = (
+                [{"rows": 1}] if ctas_method == CtasMethod.TABLE else 
[{"result": True}]
+            )
+        self.assertEqual(expected_result, result["data"])
+        expected_columns = []
+        if backend == "presto":
+            expected_columns = [
+                {
+                    "name": "rows" if ctas_method == CtasMethod.TABLE else 
"result",
+                    "type": "BIGINT" if ctas_method == CtasMethod.TABLE else 
"BOOLEAN",
+                    "is_date": False,
+                }
+            ]

Review comment:
       agree, will tackle it in the upcoming PRs, do not have clear solution 
yet.
   most likely it would be possible to introduce TestDBSpec and hide that 
complexity there.




----------------------------------------------------------------
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.

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