Skip to content

Commit

Permalink
chore: Default to engine specification regarding using wildcard (apac…
Browse files Browse the repository at this point in the history
  • Loading branch information
john-bodley authored and qleroy committed Apr 28, 2024
1 parent 2de9e5f commit 4c55f85
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 5 deletions.
2 changes: 1 addition & 1 deletion superset/databases/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -871,7 +871,7 @@ def select_star(
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__)
Expand Down
1 change: 0 additions & 1 deletion superset/databases/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 1 addition & 3 deletions tests/integration_tests/databases/api_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -1480,7 +1480,7 @@ def test_get_invalid_table_table_metadata(self):
"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":
Expand Down Expand Up @@ -1550,8 +1550,6 @@ def test_get_select_star(self):
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):
"""
Expand Down

0 comments on commit 4c55f85

Please sign in to comment.