-
Notifications
You must be signed in to change notification settings - Fork 187
feat: support with ties in FetchRel #797
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
base: main
Are you sure you want to change the base?
Changes from 2 commits
d79e6c3
9074ce4
05ef587
9581eab
da71b95
a9d3bff
972baa0
94cf1c6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -319,6 +319,19 @@ message FetchRel { | |
| // Recommended type for count is int64. | ||
| Expression count_expr = 6; | ||
| } | ||
|
|
||
| // List of fields to sort by to retrieve the number of records specified by `count_mode`. | ||
| // At least one filed MUST be specified when `with_ties` is true. | ||
| // | ||
| // Note: the output records are in the order of `sorts` if at least one sort field is specified. | ||
| // Otherwise, the input orderedness is assumed. | ||
yongchul marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| repeated SortField sorts = 7; | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. During sync up, @jacques-n asked what is the minimal thing need to be done to support the scenario. The minimal is to specify list of column comparisons the same way as the backing This (comparison, equality) happen two places in Substrait today: Perhaps, we can do is message EqualField {
Expression.FieldReference field = 1;
ComparisonJoinKey.ComparisonType comparison = 2;
}
message FetchRel {
..
repeated EqualField tie_breakers = 7;
bool with_ties = 8; // optional. maybe implicit based on non-empty `tie_breakers` field.
..
}Then to implement |
||
|
|
||
| // Whether to yields 'tie' records of the last record specified by `count_mode`. | ||
| // Tie is determined by the `sorts` order (i.e., `sorts` field values are the same if records are 'tie'). | ||
| // If set to true, `sorts` MUST specify at least one sort field. | ||
| bool with_ties = 8; | ||
yongchul marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| substrait.extensions.AdvancedExtension advanced_extension = 10; | ||
| } | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.