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

move array_replace family functions to datafusion-function-array crate #9651

Merged
merged 11 commits into from
Mar 18, 2024

Conversation

Weijun-H
Copy link
Member

Which issue does this PR close?

Relate #9285

Rationale for this change

What changes are included in this PR?

Are these changes tested?

Are there any user-facing changes?

@github-actions github-actions bot added logical-expr Logical plan and expressions physical-expr Physical Expressions core Core DataFusion crate labels Mar 17, 2024
@Weijun-H Weijun-H force-pushed the move-array-replace-family branch 2 times, most recently from a6c47ec to ba2a344 Compare March 17, 2024 04:49
Copy link
Contributor

@comphead comphead left a comment

Choose a reason for hiding this comment

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

lgtm thanks @Weijun-H

/// [[1, 2, 3], [2, 3, 4], [2, 3, 4]], [[1, 2, 3], [2, 3, 4], [3, 4, 5]], 1, false => [true, false, false]
/// )
/// ```
pub(crate) fn compare_element_to_list(
Copy link
Contributor

@jayzhan211 jayzhan211 Mar 18, 2024

Choose a reason for hiding this comment

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

We can move it to utils, not only replace functions rely on it.

@@ -115,6 +119,9 @@ pub fn register_all(registry: &mut dyn FunctionRegistry) -> Result<()> {
set_ops::array_union_udf(),
position::array_position_udf(),
position::array_positions_udf(),
array_replace::array_replace_n_udf(),
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: I think we can name it replace

from_array.clone(),
to_array.clone()
),
criterion::black_box(&expected_array).clone()
Copy link
Contributor

Choose a reason for hiding this comment

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

is it possible to avoid the clone here? it is already cloned in L38

@alamb
Copy link
Contributor

alamb commented Mar 18, 2024

Thanks @Weijun-H ! I pushed a commit to this branch to resolve the CI failure

@alamb alamb merged commit 449738c into apache:main Mar 18, 2024
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Core DataFusion crate logical-expr Logical plan and expressions physical-expr Physical Expressions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants