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

Replace supports_bounded_execution with supports_retract_batch #13

Closed
wants to merge 7 commits into from
Closed

Conversation

mustafasrepo
Copy link

Which issue does this PR close?

Closes #.

Rationale for this change

With the changes in the target PR, supports_retract_batch method is introduced to the Accumulator trait. With the introduction of supports_retract_batch method, supports_bounded_execution method is no longer necessary for the AggregateExpr trait. (Similar to the case we have move supports_bounded_execution trait from BuiltinWindowFunctionExpr to PartitionEvalautor trait.)

This PR removes supports_bounded_execution method from AggregateExpr and moves its functionality to supports_retract_batch method in the Accumulator` trait for existing accumulators.

What changes are included in this PR?

Are these changes tested?

Are there any user-facing changes?

Copy link
Owner

@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.

This looks really nice 👌 Thank you @mustafasrepo

@alamb
Copy link
Owner

alamb commented Jun 15, 2023

I would like to propose we merge apache#6671 and then apply this change as its own PR as I think they are independent.

alamb and others added 3 commits June 15, 2023 17:30
…window functions (apache#6671)

* feat: support sliding window accumulators

Rationale:

The default implementation of the `Accumulator` trait returns an error
for the `retract_batch` API.

* Allow AggregateUDF to define retractable batch

* Return error rather than wrong results when aggregate without retract_batch is used as a sliding accumulator

---------

Co-authored-by: Stuart Carnie <stuart.carnie@gmail.com>
# Conflicts:
#	datafusion/core/src/physical_plan/udaf.rs
#	datafusion/core/src/physical_plan/windows/mod.rs
#	datafusion/core/tests/user_defined_aggregates.rs
@mustafasrepo mustafasrepo deleted the feature/6671_exp branch July 14, 2023 07:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants