You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "mknaw (via GitHub)" <gi...@apache.org> on 2024/06/08 19:49:13 UTC
[PR] Convert `VariancePopulation` to UDAF [datafusion]
mknaw opened a new pull request, #10836:
URL: https://github.com/apache/datafusion/pull/10836
## Which issue does this PR close?
<!--
We generally require a GitHub issue to be filed for all bug fixes and enhancements and this helps us generate change logs for our releases. You can link an issue to this PR using the GitHub syntax. For example `Closes #123` indicates that this PR will close issue #123.
-->
Closes #10668
## Rationale for this change
<!--
Why are you proposing this change? If this is already explained clearly in the issue then this section is not needed.
Explaining clearly why changes are proposed helps reviewers understand your changes and offer better suggestions for fixes.
-->
## What changes are included in this PR?
<!--
There is no need to duplicate the description in the issue here but it is sometimes worth providing a summary of the individual changes in this PR.
-->
## Are these changes tested?
yes, via sqllogictest
## Are there any user-facing changes?
sure hope not
--
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] Convert `VariancePopulation` to UDAF [datafusion]
Posted by "jayzhan211 (via GitHub)" <gi...@apache.org>.
jayzhan211 commented on PR #10836:
URL: https://github.com/apache/datafusion/pull/10836#issuecomment-2157080515
Thanks @mknaw and @goldmedal
--
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] Convert `VariancePopulation` to UDAF [datafusion]
Posted by "jayzhan211 (via GitHub)" <gi...@apache.org>.
jayzhan211 merged PR #10836:
URL: https://github.com/apache/datafusion/pull/10836
--
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] Convert `VariancePopulation` to UDAF [datafusion]
Posted by "mknaw (via GitHub)" <gi...@apache.org>.
mknaw commented on code in PR #10836:
URL: https://github.com/apache/datafusion/pull/10836#discussion_r1632099605
##########
datafusion/physical-expr/src/aggregate/build_in.rs:
##########
@@ -709,44 +703,6 @@ mod tests {
Ok(())
}
- #[test]
- fn test_var_pop_expr() -> Result<()> {
- let funcs = vec![AggregateFunction::VariancePop];
- let data_types = vec![
- DataType::UInt32,
- DataType::UInt64,
- DataType::Int32,
- DataType::Int64,
- DataType::Float32,
- DataType::Float64,
- ];
- for fun in funcs {
- for data_type in &data_types {
- let input_schema =
- Schema::new(vec![Field::new("c1", data_type.clone(), true)]);
- let input_phy_exprs: Vec<Arc<dyn PhysicalExpr>> = vec![Arc::new(
- expressions::Column::new_with_schema("c1", &input_schema).unwrap(),
- )];
- let result_agg_phy_exprs = create_physical_agg_expr_for_test(
- &fun,
- false,
- &input_phy_exprs[0..1],
- &input_schema,
- "c1",
- )?;
- if fun == AggregateFunction::VariancePop {
- assert!(result_agg_phy_exprs.as_any().is::<VariancePop>());
- assert_eq!("c1", result_agg_phy_exprs.name());
- assert_eq!(
- Field::new("c1", DataType::Float64, true),
- result_agg_phy_exprs.field().unwrap()
- )
- }
- }
- }
- Ok(())
- }
Review Comment:
I _believe_ this is covered by the sqllogictests, but this belief may be ignorant
--
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] Convert `VariancePopulation` to UDAF [datafusion]
Posted by "jayzhan211 (via GitHub)" <gi...@apache.org>.
jayzhan211 commented on PR #10836:
URL: https://github.com/apache/datafusion/pull/10836#issuecomment-2156247362
I think you need to comment out `variance pop` in proto
https://github.com/apache/datafusion/blob/6b7021479c956ba3ca2a04fff81487cd57f80624/datafusion/proto/proto/datafusion.proto#L483
And, run `./regen.sh` under `datafusion/proto`
--
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