Skip to content

Commit

Permalink
fix(chart-data): ignore orderby on sample result type (apache#11656)
Browse files Browse the repository at this point in the history
  • Loading branch information
villebro authored Nov 11, 2020
1 parent 329e728 commit 77dff0e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions superset/common/query_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ def get_single_payload(self, query_obj: QueryObject) -> Dict[str, Any]:
if self.result_type == utils.ChartDataResultType.SAMPLES:
row_limit = query_obj.row_limit or math.inf
query_obj = copy.copy(query_obj)
query_obj.orderby = []
query_obj.groupby = []
query_obj.metrics = []
query_obj.post_processing = []
Expand Down
2 changes: 1 addition & 1 deletion tests/fixtures/query_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"is_timeseries": False,
"metrics": [{"label": "sum__num"}],
"order_desc": True,
"orderby": [],
"orderby": [["sum__num", False]],
"row_limit": 100,
"time_range": "100 years ago : now",
"timeseries_limit": 0,
Expand Down

0 comments on commit 77dff0e

Please sign in to comment.