Skip to content

Commit a31a0f8

Browse files
committed
Deprecate unused ScalarUDF::display_name
1 parent 43718d5 commit a31a0f8

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

datafusion/expr/src/udf.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,12 @@ impl ScalarUDF {
144144
/// Returns this function's display_name.
145145
///
146146
/// See [`ScalarUDFImpl::display_name`] for more details
147+
#[deprecated(
148+
since = "50.0.0",
149+
note = "This method is unused and will be removed in a future release"
150+
)]
147151
pub fn display_name(&self, args: &[Expr]) -> Result<String> {
152+
#[expect(deprecated)]
148153
self.inner.display_name(args)
149154
}
150155

@@ -442,6 +447,10 @@ pub trait ScalarUDFImpl: Debug + Send + Sync {
442447
/// function.
443448
///
444449
/// Defaults to `name(args[0], args[1], ...)`
450+
#[deprecated(
451+
since = "50.0.0",
452+
note = "This method is unused and will be removed in a future release"
453+
)]
445454
fn display_name(&self, args: &[Expr]) -> Result<String> {
446455
let names: Vec<String> = args.iter().map(ToString::to_string).collect();
447456
// TODO: join with ", " to standardize the formatting of Vec<Expr>, <https://github.com/apache/datafusion/issues/10364>
@@ -774,6 +783,7 @@ impl ScalarUDFImpl for AliasedScalarUDFImpl {
774783
}
775784

776785
fn display_name(&self, args: &[Expr]) -> Result<String> {
786+
#[expect(deprecated)]
777787
self.inner.display_name(args)
778788
}
779789

0 commit comments

Comments
 (0)