alamb commented on code in PR #12098:
URL: https://github.com/apache/datafusion/pull/12098#discussion_r1725435478
##########
datafusion/expr/src/udaf.rs:
##########
@@ -442,7 +442,7 @@ pub trait AggregateUDFImpl: Debug + Send + Sync {
/// not implement the method, returns an error. Order insensitive and hard
/// requirement aggregators return `Ok(None)`.
fn with_beneficial_ordering(
- self: Arc<Self>,
+ &self,
Review Comment:
I think the idea is that passing through the `&Arc` allows the result to be
created without a deep copy., though maybe it is being overly optimized 🤔
##########
datafusion/expr/src/udaf.rs:
##########
@@ -608,6 +608,60 @@ impl AggregateUDFImpl for AliasedAggregateUDFImpl {
&self.aliases
}
+ fn state_fields(&self, args: StateFieldsArgs) -> Result<Vec<Field>> {
Review Comment:
👍 nice - to avoid similar bugs in the future maybe we should also add a
comment to `AggregateUDFImpl` that tries to remind people to add an
implementation here.
It would be cool if we could tell Rust not to create a default
implementation for a particular `impl` so the compiler could do the check for
us, but I don't know how to express that in Rust
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]