Skip to content

Minor: Make execute_input_stream Accessible for Any Sinking Operators #11449

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

Merged
merged 1 commit into from
Jul 16, 2024

Conversation

berkaysynnada
Copy link
Contributor

Which issue does this PR close?

Closes #.

Rationale for this change

Currently, DF does not utilize execute_input_stream() outside of the DataSinkExec implementation. However, many downstream users might benefit from such a utility when writing their own sink operators. Therefore, moving it to a broader scope could be helpful.

What changes are included in this PR?

The execute_input_stream() function has been moved from the DataSinkExec implementation to lib.rs in the physical_plan module.

Are these changes tested?

Are there any user-facing changes?

Copy link
Contributor

@ozankabak ozankabak left a comment

Choose a reason for hiding this comment

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

LGTM thank you

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 @berkaysynnada and @ozankabak for the review

BTW one thing that we might consider based on @comphead 's discussion #11375 is if we should put these functions in a module like util: datafusion/physical-plan/src/utils.rs

However nothing else in this crate does so and thus I think this PR follows the pattern of the existing code and so 👍 from me

cc @devinjdangelo

@@ -805,6 +805,97 @@ pub fn execute_stream_partitioned(
Ok(streams)
}

/// Executes an input stream and ensures that the resulting stream adheres to
Copy link
Contributor

Choose a reason for hiding this comment

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

❤️ for the documentation

@alamb
Copy link
Contributor

alamb commented Jul 16, 2024

Let's move the code around in a subsequent PR if we think that is useful

@alamb alamb merged commit 82fd6a7 into apache:main Jul 16, 2024
23 checks passed
@alamb
Copy link
Contributor

alamb commented Jul 16, 2024

Thanks again @berkaysynnada and @ozankabak

xinlifoobar pushed a commit to xinlifoobar/datafusion that referenced this pull request Jul 17, 2024
xinlifoobar pushed a commit to xinlifoobar/datafusion that referenced this pull request Jul 18, 2024
wiedld pushed a commit to influxdata/arrow-datafusion that referenced this pull request Jul 31, 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.

3 participants