mirror of
https://github.com/apache/superset.git
synced 2024-09-12 16:49:40 -04:00
chore: Default to engine specification regarding using wildcard (#27843)
(cherry picked from commit 30bc8f06dc
)
This commit is contained in:
parent
40fdbd1d05
commit
1b7f599107
@ -865,7 +865,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__)
|
||||
|
@ -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,
|
||||
|
@ -1479,7 +1479,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":
|
||||
@ -1549,8 +1549,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):
|
||||
"""
|
||||
|
Loading…
Reference in New Issue
Block a user