Skip to content

Minor: Make execute_input_stream Accessible for Any Sinking Operators - #11449

Merged
alamb merged 1 commit into
apache:mainfrom
synnada-ai:minor/move-execute-input-stream
Jul 16, 2024
Merged

alamb merged 1 commit into
apache:mainfrom
synnada-ai:minor/move-execute-input-stream

Conversation

@berkaysynnada

Copy link
Copy Markdown
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?

@ozankabak ozankabak left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM thank you

@alamb alamb left a comment

Copy link
Copy Markdown
Contributor

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

Ok(streams)
}

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

Copy link
Copy Markdown
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

alamb commented Jul 16, 2024

Copy link
Copy Markdown
Contributor

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
@alamb

alamb commented Jul 16, 2024

Copy link
Copy Markdown
Contributor

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