-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Move PartitionSearchMode
into datafusion_physical_plan, rename to InputOrderMode
#8364
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
b77e354
Move PartitionSearchMode into datafusion_physical_plan
alamb f0cdae8
Improve comments
alamb 4f4120e
Rename to InputOrderMode
alamb 445d708
Merge remote-tracking branch 'apache/main' into alamb/partition_mode
alamb 00652df
Update prost
alamb ae148df
Merge remote-tracking branch 'apache/main' into alamb/partition_mode
alamb File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
// Licensed to the Apache Software Foundation (ASF) under one | ||
// or more contributor license agreements. See the NOTICE file | ||
// distributed with this work for additional information | ||
// regarding copyright ownership. The ASF licenses this file | ||
// to you under the Apache License, Version 2.0 (the | ||
// "License"); you may not use this file except in compliance | ||
// with the License. You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, | ||
// software distributed under the License is distributed on an | ||
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
// KIND, either express or implied. See the License for the | ||
// specific language governing permissions and limitations | ||
// under the License. | ||
|
||
/// Specifies how the input to an aggregation or window operator is ordered | ||
/// relative to their `GROUP BY` or `PARTITION BY` expressions. | ||
/// | ||
/// For example, if the existing ordering is `[a ASC, b ASC, c ASC]` | ||
/// | ||
/// ## Window Functions | ||
/// - A `PARTITION BY b` clause can use `Linear` mode. | ||
/// - A `PARTITION BY a, c` or a `PARTITION BY c, a` can use | ||
/// `PartiallySorted([0])` or `PartiallySorted([1])` modes, respectively. | ||
/// (The vector stores the index of `a` in the respective PARTITION BY expression.) | ||
/// - A `PARTITION BY a, b` or a `PARTITION BY b, a` can use `Sorted` mode. | ||
/// | ||
/// ## Aggregations | ||
/// - A `GROUP BY b` clause can use `Linear` mode. | ||
/// - A `GROUP BY a, c` or a `GROUP BY BY c, a` can use | ||
/// `PartiallySorted([0])` or `PartiallySorted([1])` modes, respectively. | ||
/// (The vector stores the index of `a` in the respective PARTITION BY expression.) | ||
/// - A `GROUP BY a, b` or a `GROUP BY b, a` can use `Sorted` mode. | ||
/// | ||
/// Note these are the same examples as above, but with `GROUP BY` instead of | ||
/// `PARTITION BY` to make the examples easier to read. | ||
#[derive(Debug, Clone, PartialEq)] | ||
pub enum InputOrderMode { | ||
/// There is no partial permutation of the expressions satisfying the | ||
/// existing ordering. | ||
Linear, | ||
/// There is a partial permutation of the expressions satisfying the | ||
/// existing ordering. Indices describing the longest partial permutation | ||
/// are stored in the vector. | ||
PartiallySorted(Vec<usize>), | ||
/// There is a (full) permutation of the expressions satisfying the | ||
/// existing ordering. | ||
Sorted, | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
I thought making the
GROUP BY
correspondence made this example clearer, even though there is non trivial redundancy