Skip to content

fix: Make default sort order nulls last - #1766

Open
nuno-faria wants to merge 1 commit into
apache:mainfrom
nuno-faria:fix_default_sort_null
Open

nuno-faria wants to merge 1 commit into
apache:mainfrom
nuno-faria:fix_default_sort_null

Conversation

@nuno-faria

Copy link
Copy Markdown
Contributor

Which issue does this PR close?

Closes #1765.

Rationale for this change

Make sort follow the same default as upstream (i.e., order nulls last).

What changes are included in this PR?

  • Changed the default value of nulls_first to False.
  • Added a unit test / updated previous tests.

Are there any user-facing changes?

df.sort without an explicit nulls_first orders nulls last, similarly to df.sort_by and SQL's ORDER BY.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Null treatment of sort does not follow DataFusion's default

1 participant