This is an automated email from the ASF dual-hosted git repository.

johnbodley pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/superset.git


The following commit(s) were added to refs/heads/master by this push:
     new 30bc8f06dc chore: Default to engine specification regarding using 
wildcard (#27843)
30bc8f06dc is described below

commit 30bc8f06dc822080e56633a3dcf3bcc0546e54d9
Author: John Bodley <[email protected]>
AuthorDate: Wed Apr 3 09:09:37 2024 -0700

    chore: Default to engine specification regarding using wildcard (#27843)
---
 superset/databases/api.py                      | 2 +-
 superset/databases/utils.py                    | 1 -
 tests/integration_tests/databases/api_tests.py | 4 +---
 3 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/superset/databases/api.py b/superset/databases/api.py
index f1d3f34dbc..40980dc87a 100644
--- a/superset/databases/api.py
+++ b/superset/databases/api.py
@@ -871,7 +871,7 @@ class DatabaseRestApi(BaseSupersetModelRestApi):
         self.incr_stats("init", self.select_star.__name__)
         try:
             result = database.select_star(
-                table_name, schema_name, latest_partition=True, show_cols=True
+                table_name, schema_name, latest_partition=True
             )
         except NoSuchTableError:
             self.incr_stats("error", self.select_star.__name__)
diff --git a/superset/databases/utils.py b/superset/databases/utils.py
index 21abd7b9c2..8de4bb6f23 100644
--- a/superset/databases/utils.py
+++ b/superset/databases/utils.py
@@ -92,7 +92,6 @@ def get_table_metadata(
         "selectStar": database.select_star(
             table_name,
             schema=schema_name,
-            show_cols=True,
             indent=True,
             cols=columns,
             latest_partition=True,
diff --git a/tests/integration_tests/databases/api_tests.py 
b/tests/integration_tests/databases/api_tests.py
index 249b953960..7f65c5bd41 100644
--- a/tests/integration_tests/databases/api_tests.py
+++ b/tests/integration_tests/databases/api_tests.py
@@ -1480,7 +1480,7 @@ class TestDatabaseApi(SupersetTestCase):
                     "indexes": [],
                     "name": "wrong_table",
                     "primaryKey": {"constrained_columns": None, "name": None},
-                    "selectStar": "SELECT\nFROM wrong_table\nLIMIT 100\nOFFSET 
0",
+                    "selectStar": "SELECT\n  *\nFROM wrong_table\nLIMIT 
100\nOFFSET 0",
                 },
             )
         elif example_db.backend == "mysql":
@@ -1550,8 +1550,6 @@ class TestDatabaseApi(SupersetTestCase):
         uri = f"api/v1/database/{example_db.id}/select_star/birth_names/"
         rv = self.client.get(uri)
         self.assertEqual(rv.status_code, 200)
-        response = json.loads(rv.data.decode("utf-8"))
-        self.assertIn("gender", response["result"])
 
     def test_get_select_star_not_allowed(self):
         """

Reply via email to