Skip to content

Refactor SortExec's buffered batches for better code readability #15372

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

Open
2010YOUY01 opened this issue Mar 24, 2025 · 1 comment
Open

Refactor SortExec's buffered batches for better code readability #15372

2010YOUY01 opened this issue Mar 24, 2025 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@2010YOUY01
Copy link
Contributor

Is your feature request related to a problem or challenge?

Reference #15355 (comment) #15355 (comment)

The high-level execution logic of SortExec is described in https://github.com/apache/datafusion/blob/main/datafusion/physical-plan/src/sorts/sort.rs, now a single field in_mem_batches is used to represent buffered data in different stage: during different time, it can be interpreted as either unordered input batch, or globally sorted batch:

in_mem_batches: Vec<RecordBatch>,

This approach has poor understandability and is also error-prone, see the idea in reference discussion for improvements.

Describe the solution you'd like

No response

Describe alternatives you've considered

No response

Additional context

No response

@2010YOUY01
Copy link
Contributor Author

take

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

1 participant