Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Ballista] Enable ApproxPercentileWithWeight in Ballista and fill UT #2192

Merged
merged 2 commits into from
Apr 18, 2022

Conversation

Ted-Jiang
Copy link
Member

@Ted-Jiang Ted-Jiang commented Apr 10, 2022

Which issue does this PR close?

Closes #2193.

Rationale for this change

What changes are included in this PR?

Are there any user-facing changes?

@github-actions github-actions bot added ballista datafusion Changes in the datafusion crate labels Apr 10, 2022
@Ted-Jiang
Copy link
Member Author

@houqp @yjshen plz take a look.

let res = df.collect().await.unwrap();
let expected = vec![
"+---------------------------------------------------------------+",
"| APPROXPERCENTILECONTWITHWEIGHT(test.id,Int64(2),Float64(0.5)) |",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤔 hard to read a little bit.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thinks this name is align with proto file, it try to rewrite debug or display of this struct , it not works😂

@liukun4515
Copy link
Contributor

@Ted-Jiang Ted-Jiang closed this Apr 13, 2022
@Ted-Jiang Ted-Jiang reopened this Apr 13, 2022
@Ted-Jiang
Copy link
Member Author

Ted-Jiang commented Apr 13, 2022

I think we should add the function in

https://github.com/apache/arrow-datafusion/blob/28a6da3d2d175eb9d2f4ff8a6ea58e7c22dae97c/ballista/rust/core/proto/datafusion.proto#L203

proto

Yes , but there is some issue in #2221
but in df it just rewrite APPROX_MEDIAN to APPROX_PERCENTILE(0.5)

@liukun4515
Copy link
Contributor

I think we should add the function in
https://github.com/apache/arrow-datafusion/blob/28a6da3d2d175eb9d2f4ff8a6ea58e7c22dae97c/ballista/rust/core/proto/datafusion.proto#L203

proto

Yes , but there is some issue in #2221 but in df it just rewrite APPROX_MEDIAN to APPROX_PERCENTILE(0.5)

My thought is that we should add

APPROX_PERCENTILE_CONT_WITH_WEIGHT = 16;

behind the APPROX_MEDIAN=15; in the proto file.

@yjshen yjshen merged commit c91efc2 into apache:master Apr 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
datafusion Changes in the datafusion crate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enable ApproxPercentileWithWeight in Ballista
4 participants