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

[Datasets] Add logical operator for aggregate #32462

Merged
merged 1 commit into from
Feb 14, 2023
Merged

Conversation

c21
Copy link
Contributor

@c21 c21 commented Feb 11, 2023

Signed-off-by: Cheng Su scnju13@gmail.com

Why are these changes needed?

This PR is to add logical operator for group-by aggregate. The change includes:

  • Aggregate: the logical operator for aggregate
  • generate_aggregate_fn: the generated function for aggregate operator
  • SortAggregateTaskSpec: the task spec for doing sort-based aggregate, mostly refactored from _GroupbyOp.

Related issue number

Checks

  • I've signed off every commit(by using the -s flag, i.e., git commit -s) in this PR.
  • I've run scripts/format.sh to lint the changes in this PR.
  • I've included any doc changes needed for https://docs.ray.io/en/master/.
  • I've made sure the tests are passing. Note that there might be a few flaky tests, see the recent failures at https://flakey-tests.ray.io/
  • Testing Strategy
    • Unit tests
    • Release tests
    • This PR is not tested :(

Signed-off-by: Cheng Su <scnju13@gmail.com>
"""Generate function to aggregate blocks by the specified key column or key
function.
"""
# TODO: validate blocks with AggregateFn._validate.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Created followup issue in #32463 .

)


class SortAggregateTaskSpec(ExchangeTaskSpec):
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This class is mostly copied from _GroupbyOp.

@c21
Copy link
Contributor Author

c21 commented Feb 13, 2023

The failure in book-documentation is irrelevant.

@ericl ericl merged commit 66c0533 into ray-project:master Feb 14, 2023
edoakes pushed a commit to edoakes/ray that referenced this pull request Mar 22, 2023
This PR is to add logical operator for group-by aggregate. The change includes:
* `Aggregate`: the logical operator for aggregate
* `generate_aggregate_fn`: the generated function for aggregate operator
* `SortAggregateTaskSpec`: the task spec for doing sort-based aggregate, mostly refactored from [_GroupbyOp](https://github.com/ray-project/ray/blob/master/python/ray/data/grouped_dataset.py#L35).

Signed-off-by: Edward Oakes <ed.nmi.oakes@gmail.com>
c21 pushed a commit that referenced this pull request Apr 17, 2023
…4292)

As a followup of #32462, we should validate aggregate functions with `AggregateFn._validate`, in `generate_aggregate_fn()` before doing aggregate.

Signed-off-by: Scott Lee <sjl@anyscale.com>
vitsai pushed a commit to vitsai/ray that referenced this pull request Apr 17, 2023
…y-project#34292)

As a followup of ray-project#32462, we should validate aggregate functions with `AggregateFn._validate`, in `generate_aggregate_fn()` before doing aggregate.

Signed-off-by: Scott Lee <sjl@anyscale.com>
elliottower pushed a commit to elliottower/ray that referenced this pull request Apr 22, 2023
This PR is to add logical operator for group-by aggregate. The change includes:
* `Aggregate`: the logical operator for aggregate
* `generate_aggregate_fn`: the generated function for aggregate operator
* `SortAggregateTaskSpec`: the task spec for doing sort-based aggregate, mostly refactored from [_GroupbyOp](https://github.com/ray-project/ray/blob/master/python/ray/data/grouped_dataset.py#L35).

Signed-off-by: elliottower <elliot@elliottower.com>
elliottower pushed a commit to elliottower/ray that referenced this pull request Apr 22, 2023
…y-project#34292)

As a followup of ray-project#32462, we should validate aggregate functions with `AggregateFn._validate`, in `generate_aggregate_fn()` before doing aggregate.

Signed-off-by: Scott Lee <sjl@anyscale.com>
Signed-off-by: elliottower <elliot@elliottower.com>
ProjectsByJackHe pushed a commit to ProjectsByJackHe/ray that referenced this pull request May 4, 2023
…y-project#34292)

As a followup of ray-project#32462, we should validate aggregate functions with `AggregateFn._validate`, in `generate_aggregate_fn()` before doing aggregate.

Signed-off-by: Scott Lee <sjl@anyscale.com>
Signed-off-by: Jack He <jackhe2345@gmail.com>
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.

4 participants