Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Default to engine specification regarding using wildcard #27843

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading