-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
LexRequirement as a struct, instead of a type #12583
Conversation
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.
LGTM, thank you @ngli-me
@@ -264,9 +267,55 @@ pub type LexOrdering = Vec<PhysicalSortExpr>; | |||
/// a reference to a lexicographical ordering. | |||
pub type LexOrderingRef<'a> = &'a [PhysicalSortExpr]; |
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.
Perhaps we could follow a similar pattern for LexOrderingRef
, too.
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 a separate issue for this, #12591!
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.
BTW having a real struct will make printing these structures much easier -- e.g. I had to do some akward workarounds to implement Display
or LexOrdering
in #12590
…ement was not being converted after the merge.
Made some adjustments, since there was a merge conflict :) |
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.
Love it -- thank you @ngli-me and @berkaysynnada
* Converted LexRequirement into a struct. * Adjusted the wrapping to return the correct type, since the LexRequirement was not being converted after the merge. --------- Co-authored-by: nglime <[email protected]>
Which issue does this PR close?
Closes #12255.
Rationale for this change
What changes are included in this PR?
Converted LexRequirement type into a struct, with the
Vec<PhysicalSortRequirement>
as the field labeledinner
.Added two functions for convenience, an
iter
andpush
function relating to the struct field.Added implementations for
Deref
,FromIterator
andIntoIterator
.Are these changes tested?
Adjusted the existing tests
Are there any user-facing changes?
The
Vec<PhysicalSortRequirement>
needs to be wrapped to initialize the struct insance, and some of the usage needs to be adjusted to get the field from the struct.