Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Row Format in SortExec #7053

Open
Tracked by #10313
tustvold opened this issue Jul 21, 2023 · 2 comments
Open
Tracked by #10313

Use Row Format in SortExec #7053

tustvold opened this issue Jul 21, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@tustvold
Copy link
Contributor

tustvold commented Jul 21, 2023

Is your feature request related to a problem or challenge?

Currently SortExec::sort_batch_stream uses lexsort_to_indices to sort the produced RecordBatch. For multi-column sorts this makes use of LexicographicalComparator. The branching and dynamic dispatch involved in this comparator is relatively expensive. Converting to the row format first, and comparing these rows has been found to offer significant performance advantages in similar applications - #3386.

Describe the solution you'd like

SortExec should:

  • If single sort column, use sort_to_indices to sort the input batches
  • If multiple columns, convert to the row format and sort using this representation
  • If performing a subsequent merge, preserve the row encoding to avoid redundant work

Describe alternatives you've considered

No response

Additional context

This is likely not a good first issue, and I do not recommend people pick it up, creating primarily for tracking purposes. I will likely pick it up at some point in the near-ish future.

@Dandandan
Copy link
Contributor

AFAIK this is implemented

@Dandandan Dandandan reopened this Dec 4, 2024
@Dandandan
Copy link
Contributor

Hm looking at the code, this doesn't seem to be the case

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants