Skip to content

refactor: Apply minor refactorings to functions-array crate #9788

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 3 commits into from
Mar 25, 2024
Merged

refactor: Apply minor refactorings to functions-array crate #9788

merged 3 commits into from
Mar 25, 2024

Conversation

erenavsarogullari
Copy link
Member

@erenavsarogullari erenavsarogullari commented Mar 25, 2024

Which issue does this PR close?

Closes #9787.

What changes are included in this PR?

This PR aims to do following refactoring:
1- Being added make_scalar_function support to missed invoke functions,
2- Aligning rust-doc across array functions,
3- Removing redundant imports,
4- Fixing typo problems,
5- Rename core.rs -> make_array.rs.

Are these changes tested?

Yes, all array.slt tests pass.

Are there any user-facing changes?

No

@erenavsarogullari erenavsarogullari changed the title refactor: Apply minor refactorings to functions-array create refactor: Apply minor refactorings to functions-array crate Mar 25, 2024
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.

Thank you @erenavsarogullari -- this looks like a very nice improvement to me

@@ -21,7 +21,7 @@

[DataFusion][df] is an extensible query execution framework, written in Rust, that uses Apache Arrow as its in-memory format.

This crate contains functions for working with arrays, such as `array_append` that work with
This crate contains functions for working with arrays, such as `array_append` that works with
Copy link
Contributor

Choose a reason for hiding this comment

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

I think the original was more correct as functions is plural

Copy link
Member Author

Choose a reason for hiding this comment

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

Addressed

pub fn array_resize_inner(arg: &[ArrayRef]) -> datafusion_common::Result<ArrayRef> {
pub(crate) fn array_resize_inner(
arg: &[ArrayRef],
) -> datafusion_common::Result<ArrayRef> {
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we also change this to just Result<ArrayRef>?

Copy link
Member Author

Choose a reason for hiding this comment

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

Addressed by covering functions-array crate. Please see commit: 638c3a7

Copy link
Contributor

@jayzhan211 jayzhan211 left a comment

Choose a reason for hiding this comment

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

👍

@erenavsarogullari
Copy link
Member Author

erenavsarogullari commented Mar 25, 2024

Thanks @alamb and @jayzhan211 for the reviews and feedback.
I have also some questions on #9787 when you have time. Thanks in advance.

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.

Thanks again @erenavsarogullari

@alamb alamb merged commit 8ebff9e into apache:main Mar 25, 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.

Apply minor refactorings to functions-array crate
3 participants