Skip to content

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

Merged
yjshen merged 2 commits intoapache:masterfrom
Ted-Jiang:FIX_CLIPPY
Apr 18, 2022
Merged

[Ballista] Enable ApproxPercentileWithWeight in Ballista and fill UT #2192
yjshen merged 2 commits intoapache:masterfrom
Ted-Jiang:FIX_CLIPPY

Conversation

@Ted-Jiang
Copy link
Copy Markdown
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?

@Ted-Jiang
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Contributor

@Ted-Jiang Ted-Jiang closed this Apr 13, 2022
@Ted-Jiang Ted-Jiang reopened this Apr 13, 2022
@Ted-Jiang
Copy link
Copy Markdown
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
Copy Markdown
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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Enable ApproxPercentileWithWeight in Ballista

4 participants