Skip to content

Commit

Permalink
fix(data-warehouse): SQL sources ORDER BY is missing (PostHog#28212)
Browse files Browse the repository at this point in the history
Co-authored-by: Eric Duong <[email protected]>
  • Loading branch information
Gilbert09 and EDsCODE authored Feb 3, 2025
1 parent a3adbfb commit 241e683
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,9 @@ def _make_query(self) -> SelectAny:
if self.end_value is not None:
query = query.where(filter_op_end(self.cursor_column, self.end_value))

# generate order by from declared row order
order_by = None
# generate order by from declared row order - default to asc
order_by = self.cursor_column.asc()

if (self.row_order == "asc" and last_value_func is max) or (
self.row_order == "desc" and last_value_func is min
):
Expand Down

0 comments on commit 241e683

Please sign in to comment.