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: Add constructors to GetFieldAccessExpr and add docs #7219

Merged
merged 1 commit into from
Aug 8, 2023

Conversation

alamb
Copy link
Contributor

@alamb alamb commented Aug 7, 2023

Which issue does this PR close?

Related to #7193
Minor follow on to https://github.com/apache/arrow-datafusion/pull/7215/files

Rationale for this change

I figured this code could have some more comments and make it easier to construct tests

What changes are included in this PR?

Minor: Add constructors to GetFieldAccessExpr and add docs

Are these changes tested?

Yes

Are there any user-facing changes?

@github-actions github-actions bot added the physical-expr Changes to the physical-expr crates label Aug 7, 2023
pub fn new(arg: Arc<dyn PhysicalExpr>, field: GetFieldAccessExpr) -> Self {
Self { arg, field }
}

/// Get the input field
/// Create a new [`GetIndexedFieldExpr`] for accessing the named field
pub fn new_field(arg: Arc<dyn PhysicalExpr>, name: impl Into<String>) -> Self {
Copy link
Contributor Author

@alamb alamb Aug 7, 2023

Choose a reason for hiding this comment

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

I made these new functions and updated the tests to use them to avoid repetition

@alamb
Copy link
Contributor Author

alamb commented Aug 7, 2023

CI is failing due to #7221

@jackwener jackwener merged commit 76fa0f1 into apache:main Aug 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
physical-expr Changes to the physical-expr crates
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants