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

Fix partition query in Presto #7250

Merged
merged 1 commit into from
Apr 9, 2019
Merged
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
4 changes: 2 additions & 2 deletions superset/db_engine_specs.py
Original file line number Diff line number Diff line change
Expand Up @@ -953,7 +953,6 @@ def _partition_query(
that determines if that field should be sorted in descending
order
:type order_by: list of (str, bool) tuples
:param filters: a list of filters to apply
:param filters: dict of field name and filter value combinations
"""
limit_clause = 'LIMIT {}'.format(limit) if limit else ''
Expand All @@ -972,7 +971,8 @@ def _partition_query(
where_clause = 'WHERE ' + ' AND '.join(l)

sql = textwrap.dedent(f"""\
SHOW PARTITIONS FROM {table_name}
SELECT * FROM "{table_name}$partitions"

{where_clause}
{order_by_clause}
{limit_clause}
Expand Down