Skip to content

Minor: remove unused source file udf.rs#10497

Merged
jonahgao merged 1 commit intoapache:mainfrom
jonahgao:remove_udf
May 15, 2024
Merged

Minor: remove unused source file udf.rs#10497
jonahgao merged 1 commit intoapache:mainfrom
jonahgao:remove_udf

Conversation

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