-
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
[Dataset] Validate sort key in Sort
LogicalOperator
#34282
Conversation
Signed-off-by: Scott Lee <sjl@anyscale.com>
Signed-off-by: Scott Lee <sjl@anyscale.com>
Signed-off-by: Scott Lee <sjl@anyscale.com>
Signed-off-by: Scott Lee <sjl@anyscale.com>
Signed-off-by: Scott Lee <sjl@anyscale.com>
if block_metadata.schema is not None and valid_block_schema is None: | ||
valid_block_schema = block_metadata.schema | ||
block_schemas.append(block_metadata.schema) | ||
if len(blocks) == 0: | ||
return (blocks, {}) | ||
if isinstance(valid_block_schema, pa.lib.Schema): | ||
unified_schema = unify_schemas(block_schemas) | ||
else: # Covers both simple-type and None cases. | ||
if isinstance(valid_block_schema, type): | ||
assert all([b == valid_block_schema for b in block_schemas]) | ||
unified_schema = valid_block_schema | ||
_validate_key_fn(unified_schema, key) |
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.
could we refactor https://github.com/ray-project/ray/blob/master/python/ray/data/_internal/plan.py#L427-L453 into a common method, and reuse the same code here?
Signed-off-by: Scott Lee <sjl@anyscale.com>
Signed-off-by: Scott Lee <sjl@anyscale.com>
Signed-off-by: Scott Lee <sjl@anyscale.com>
Signed-off-by: Scott Lee <sjl@anyscale.com>
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.
LG
Merging to master. |
) 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>
Why are these changes needed?
See #32137
Related issue number
Closes #32137
Checks
git commit -s
) in this PR.scripts/format.sh
to lint the changes in this PR.method in Tune, I've added it in
doc/source/tune/api/
under thecorresponding
.rst
file.