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

Minor: move batch spilling methods to lib.rs to make it reusable #11154

Merged
merged 1 commit into from
Jun 28, 2024

Conversation

comphead
Copy link
Contributor

@comphead comphead commented Jun 28, 2024

Which issue does this PR close?

Related to #9359 .

Rationale for this change

It looks like a bunch of useful spilling batch methods that can be used in any place whenever spilling is needed, not only for the sorting

What changes are included in this PR?

Are these changes tested?

Are there any user-facing changes?

Copy link
Contributor

@alamb alamb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me -- Thanks @comphead

@@ -29,10 +29,10 @@ use crate::aggregates::{
};
use crate::common::IPCWriter;
use crate::metrics::{BaselineMetrics, RecordOutput};
use crate::sorts::sort::{read_spill_as_stream, sort_batch};
use crate::sorts::sort::sort_batch;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we can do the same with sort_batch

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @alamb I'll probably leave it as is, as it tied to sorting logic. Once we have another use case for making it a helper method and move it the same way for sure.

@comphead comphead merged commit f1360b8 into apache:main Jun 28, 2024
24 checks passed
findepi pushed a commit to findepi/datafusion that referenced this pull request Jul 16, 2024
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.

2 participants