File tree Expand file tree Collapse file tree 1 file changed +1
-4
lines changed Expand file tree Collapse file tree 1 file changed +1
-4
lines changed Original file line number Diff line number Diff line change @@ -471,15 +471,12 @@ def _get_ordering(self):
471
471
idx = itertools .count (start = 1 )
472
472
for order in self .order_by_expressions or []:
473
473
if isinstance (order .expression , Ref ):
474
- # TODO change?
475
- # field_name = order.expression.as_mql(self, self.connection).removeprefix("$")
476
- # extra_fields[field_name] = order.expression
477
474
field_name = order .expression .refs
478
475
elif isinstance (order .expression , Col ):
479
476
field_name = order .expression .as_mql (self , self .connection ).removeprefix ("$" )
480
477
fields [field_name ] = order .expression
481
478
else :
482
- # The expression must be added to extra_fields with an alias.
479
+ # The expression must be added to fields with an alias.
483
480
field_name = f"__order{ next (idx )} "
484
481
fields [field_name ] = order .expression
485
482
# If the expression is ordered by NULLS FIRST or NULLS LAST,
You can’t perform that action at this time.
0 commit comments