Skip to content

Commit

Permalink
Reveal implementing type and return type in simple UDF implementations (
Browse files Browse the repository at this point in the history
apache#13730)

Debug trait is useful for understanding what something is and how it's
configured, especially if the implementation is behind dyn trait.
  • Loading branch information
findepi authored Dec 11, 2024
1 parent a52eb47 commit 95405a9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions datafusion/expr/src/expr_fn.rs
Original file line number Diff line number Diff line change
Expand Up @@ -416,9 +416,10 @@ pub struct SimpleScalarUDF {

impl Debug for SimpleScalarUDF {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
f.debug_struct("ScalarUDF")
f.debug_struct("SimpleScalarUDF")
.field("name", &self.name)
.field("signature", &self.signature)
.field("return_type", &self.return_type)
.field("fun", &"<FUNC>")
.finish()
}
Expand Down Expand Up @@ -524,9 +525,10 @@ pub struct SimpleAggregateUDF {

impl Debug for SimpleAggregateUDF {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
f.debug_struct("AggregateUDF")
f.debug_struct("SimpleAggregateUDF")
.field("name", &self.name)
.field("signature", &self.signature)
.field("return_type", &self.return_type)
.field("fun", &"<FUNC>")
.finish()
}
Expand Down

0 comments on commit 95405a9

Please sign in to comment.