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

Add window func related logic plan to proto ability. #4485

Merged
merged 3 commits into from
Dec 5, 2022

Conversation

Ted-Jiang
Copy link
Member

Signed-off-by: yangjiang [email protected]

Which issue does this PR close?

Closes #4480.

Rationale for this change

Help support window function in ballista.

What changes are included in this PR?

Are these changes tested?

Are there any user-facing changes?

Ok(Expr::WindowFunction {
fun: datafusion_expr::window_function::WindowFunction::BuiltInWindowFunction(
built_in_function,
),
args: vec![parse_required_expr(&expr.expr, registry, "expr")?],
Copy link
Member Author

Choose a reason for hiding this comment

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

Unlike WindowFunction with AggrFunction like min(col). max(col). sum(col) it must have required_exp

Built-in WindowFunction like ROW_NUMBER() . RANK(). DENSE() have to have this value

@Ted-Jiang Ted-Jiang requested a review from andygrove December 2, 2022 10:26
@Ted-Jiang
Copy link
Member Author

@andygrove PATL , seems this part not have a test, have tested with ballista.

Copy link
Contributor

@alamb alamb left a comment

Choose a reason for hiding this comment

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

Code looks good to me @Ted-Jiang

can you please add a test to ensure we don't introduce regressions in the future?

Signed-off-by: yangjiang <[email protected]>
@Ted-Jiang
Copy link
Member Author

Code looks good to me @Ted-Jiang

can you please add a test to ensure we don't introduce regressions in the future?

@alamb Thanks for your advice, add test in add test.

let range_number_frame = WindowFrame {
units: WindowFrameUnits::Range,
start_bound: WindowFrameBound::Preceding(ScalarValue::UInt64(Some(2))),
end_bound: WindowFrameBound::Following(ScalarValue::UInt64(Some(2))),
Copy link
Member Author

Choose a reason for hiding this comment

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

without this commit, this test will fail.

Copy link
Contributor

@alamb alamb left a comment

Choose a reason for hiding this comment

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

Thanks @Ted-Jiang -- look good to me

Signed-off-by: yangjiang <[email protected]>
@alamb alamb merged commit 34d9bb5 into apache:master Dec 5, 2022
@ursabot
Copy link

ursabot commented Dec 5, 2022

Benchmark runs are scheduled for baseline = 4f7b003 and contender = 34d9bb5. 34d9bb5 is a master commit associated with this PR. Results will be available as each benchmark for each run completes.
Conbench compare runs links:
[Skipped ⚠️ Benchmarking of arrow-datafusion-commits is not supported on ec2-t3-xlarge-us-east-2] ec2-t3-xlarge-us-east-2
[Skipped ⚠️ Benchmarking of arrow-datafusion-commits is not supported on test-mac-arm] test-mac-arm
[Skipped ⚠️ Benchmarking of arrow-datafusion-commits is not supported on ursa-i9-9960x] ursa-i9-9960x
[Skipped ⚠️ Benchmarking of arrow-datafusion-commits is not supported on ursa-thinkcentre-m75q] ursa-thinkcentre-m75q
Buildkite builds:
Supported benchmarks:
ec2-t3-xlarge-us-east-2: Supported benchmark langs: Python, R. Runs only benchmarks with cloud = True
test-mac-arm: Supported benchmark langs: C++, Python, R
ursa-i9-9960x: Supported benchmark langs: Python, R, JavaScript
ursa-thinkcentre-m75q: Supported benchmark langs: C++, Java

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.

Add window func related logic plan to proto ability.
3 participants