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

Minor: Add tests for User Defined Aggregate functions #6669

Merged
merged 2 commits into from
Jun 14, 2023

Conversation

alamb
Copy link
Contributor

@alamb alamb commented Jun 14, 2023

Which issue does this PR close?

This is part of #6611

Rationale for this change

I am adding support for sliding windows in user defined aggregates and I need some way to test it.

The actual code change is relatively small but it takes non trivial effort to test, so I wanted to add the tests first so the actual code change is clearer.

What changes are included in this PR?

Add more tests to user_defined_aggregates.rs for a user defined aggregates.

Are these changes tested?

it is only tests

Are there any user-facing changes?

No

@github-actions github-actions bot added core Core DataFusion crate logical-expr Logical plan and expressions labels Jun 14, 2023
Copy link
Contributor

@stuartcarnie stuartcarnie left a comment

Choose a reason for hiding this comment

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

Very nice, @alamb – can I help you by submitting my branch as a PR to this branch?

Comment on lines 189 to 192
/// was update_batch called?
update_batch: AtomicBool,
/// was retract batch called?
retract_batch: AtomicBool,
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice way to test expectations 👌🏻

@alamb
Copy link
Contributor Author

alamb commented Jun 14, 2023

Very nice, @alamb – can I help you by submitting my branch as a PR to this branch?

Thanks for the offer @stuartcarnie ! I already incorporated the code from your branch into #6671 (which I will have up as a PR shortly)

Co-authored-by: Liang-Chi Hsieh <viirya@gmail.com>
@alamb alamb merged commit 8eb5108 into apache:main Jun 14, 2023
@alamb alamb deleted the alamb/sliding_udf branch June 14, 2023 21:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Core DataFusion crate logical-expr Logical plan and expressions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants