Skip to content

Commit

Permalink
fix: use !asc
Browse files Browse the repository at this point in the history
Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>
  • Loading branch information
devanbenz and alamb committed Sep 20, 2024
1 parent 95e0341 commit 6d432a3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion datafusion/sql/src/statement.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1147,7 +1147,7 @@ impl<'a, S: ContextProvider> SqlToRel<'a, S> {
schema,
planner_context,
)?;
let nulls_first = ordered_expr.nulls_first.unwrap_or(true);
let nulls_first = ordered_expr.nulls_first.unwrap_or(!asc);
let asc = ordered_expr.asc.unwrap_or(true);
let sort_expr = SortExpr::new(order_expr, asc, nulls_first);
results.push(sort_expr);
Expand Down

0 comments on commit 6d432a3

Please sign in to comment.