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: remove unused source file udf.rs #10497

Merged
merged 1 commit into from
May 15, 2024
Merged

Conversation

jonahgao
Copy link
Member

Which issue does this PR close?

N/A

Rationale for this change

I have checked that all the UDFs in the file have already been implemented in other modules.
Moreover, udf.rs is not appearing in lib.rs.

What changes are included in this PR?

Are these changes tested?

Yes. By existing tests.

Are there any user-facing changes?

No

@alamb alamb changed the title Minor: remove unused source file udf.rs Minor: remove unused source file udf.rs May 14, 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 @jonahgao -- this is a great find!

I also double checked a few of these UDFs and found their second copy

🧹

}
}

make_udf_function!(
Copy link
Contributor

Choose a reason for hiding this comment

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

Here is the current copy of the code

pub(super) struct ArrayDims {
signature: Signature,
aliases: Vec<String>,
}
impl ArrayDims {

use std::sync::Arc;

// Create static instances of ScalarUDFs for each function
make_udf_function!(ArrayToString,
Copy link
Contributor

Choose a reason for hiding this comment

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

Here is the other copy:

pub(super) struct ArrayToString {
signature: Signature,
aliases: Vec<String>,
}
impl ArrayToString {
pub fn new() -> Self {
Self {
signature: Signature::variadic_any(Volatility::Immutable),
aliases: vec![
String::from("array_to_string"),
String::from("list_to_string"),
String::from("array_join"),
String::from("list_join"),
],
}
}
}
impl ScalarUDFImpl for ArrayToString {

@jonahgao jonahgao merged commit d1e4225 into apache:main May 15, 2024
24 checks passed
@jonahgao
Copy link
Member Author

Thank you for double-checking @alamb .

@jonahgao jonahgao deleted the remove_udf branch May 15, 2024 01:46
findepi pushed a commit to findepi/datafusion that referenced this pull request Jul 16, 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.

2 participants