Skip to content

Commit

Permalink
draft: questioning a few lines that force an ORDER clause
Browse files Browse the repository at this point in the history
  • Loading branch information
mistercrunch committed Oct 12, 2020
1 parent 8e58730 commit 7992bc3
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions superset/connectors/sqla/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -1082,9 +1082,6 @@ def get_sqla_query( # pylint: disable=too-many-arguments,too-many-locals,too-ma
qry = qry.where(and_(*where_clause_and))
qry = qry.having(and_(*having_clause_and))

if not orderby and ((is_sip_38 and metrics) or (not is_sip_38 and not columns)):
orderby = [(main_metric_expr, not order_desc)]

# To ensure correct handling of the ORDER BY labeling we need to reference the
# metric instance if defined in the SELECT clause.
metrics_exprs_by_label = {
Expand Down

0 comments on commit 7992bc3

Please sign in to comment.