You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "ctsk (via GitHub)" <gi...@apache.org> on 2025/03/06 09:26:22 UTC
[PR] docs: Improve docs on AggregateFunctionExpr construction [datafusion]
ctsk opened a new pull request, #15044:
URL: https://github.com/apache/datafusion/pull/15044
I stumbled on some missing documentation while trying to construct a AggregateFunctionExpr
1. AggregateFunctionExpr didn't link to AggregateExprBuilder, which seems to be the only way to construct it
2. AggregateExprBuilder did not specify that providing an alias is required.
This PR should fix both those issues.
--
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: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] docs: Improve docs on AggregateFunctionExpr construction [datafusion]
Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb merged PR #15044:
URL: https://github.com/apache/datafusion/pull/15044
--
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: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] docs: Improve docs on AggregateFunctionExpr construction [datafusion]
Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on code in PR #15044:
URL: https://github.com/apache/datafusion/pull/15044#discussion_r1983209738
##########
datafusion/physical-expr/src/aggregate.rs:
##########
@@ -91,6 +91,9 @@ impl AggregateExprBuilder {
}
}
+ /// Constructs an `AggregateFunctionExpr` from the builder
+ ///
+ /// Note that an [`Self::alias`] must be provided before calling this method.
Review Comment:
It would also be nice to update the error message below
```rust
None => return internal_err!("alias should provided"),
```
Perhaps to something like
```rust
None => return internal_err!("AggregateExprBuilder::alias must be provided prior to build"),
```
--
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: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] docs: Improve docs on AggregateFunctionExpr construction [datafusion]
Posted by "ctsk (via GitHub)" <gi...@apache.org>.
ctsk commented on code in PR #15044:
URL: https://github.com/apache/datafusion/pull/15044#discussion_r1983234072
##########
datafusion/physical-expr/src/aggregate.rs:
##########
@@ -91,6 +91,9 @@ impl AggregateExprBuilder {
}
}
+ /// Constructs an `AggregateFunctionExpr` from the builder
+ ///
+ /// Note that an [`Self::alias`] must be provided before calling this method.
Review Comment:
Sounds good :+1:
--
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: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org