-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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 sort() #32133
Conversation
|
||
|
||
class SortTaskSpec(ExchangeTaskSpec): | ||
""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file is copied from https://github.com/ray-project/ray/blob/master/python/ray/data/_internal/sort.py, with change from BlockList
to RefBundle
.
Signed-off-by: Cheng Su <scnju13@gmail.com>
descending: bool, | ||
) -> AllToAllTransformFn: | ||
"""Generate function to sort blocks by the specified key column or key function.""" | ||
# TODO: validate key with block._validate_key_fn. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Created #32137 for followup. This needs more refactoring, as it involves Dataset
object.
This PR is to add logical operator for `sort()`, the change includes: * `Sort` logical operator * `SortTaskSpec` to copy from `sort.py` * `generate_sort_fn` is generated function for sort Signed-off-by: Edward Oakes <ed.nmi.oakes@gmail.com>
As a followup of #32133, we should validate key with block.py:_validate_key_fn(), in generate_sort_fn() before doing sort. Signed-off-by: Scott Lee <sjl@anyscale.com>
) As a followup of ray-project#32133, we should validate key with block.py:_validate_key_fn(), in generate_sort_fn() before doing sort. Signed-off-by: Scott Lee <sjl@anyscale.com>
) As a followup of ray-project#32133, we should validate key with block.py:_validate_key_fn(), in generate_sort_fn() before doing sort. Signed-off-by: Scott Lee <sjl@anyscale.com> Signed-off-by: elliottower <elliot@elliottower.com>
) As a followup of ray-project#32133, we should validate key with block.py:_validate_key_fn(), in generate_sort_fn() before doing sort. Signed-off-by: Scott Lee <sjl@anyscale.com> Signed-off-by: Jack He <jackhe2345@gmail.com>
Signed-off-by: Cheng Su scnju13@gmail.com
Why are these changes needed?
This PR is to add logical operator for
sort()
, the change includes:Sort
logical operatorSortTaskSpec
to copy fromsort.py
generate_sort_fn
is generated function for sortRelated issue number
Checks
git commit -s
) in this PR.scripts/format.sh
to lint the changes in this PR.