-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Convert LexOrdering type
to struct
.
#13146
Convert LexOrdering type
to struct
.
#13146
Conversation
7ba63c3
to
bf53894
Compare
… `unwrap_or` to `unwrap_or_default`.
…LexOrdering and LexOrderingRef.
types
to structs
.
types
to structs
.type
to struct
.
I initially also converted |
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. Just have a few minor suggestions
datafusion/core/src/datasource/physical_plan/file_scan_config.rs
Outdated
Show resolved
Hide resolved
335339a
to
e99e386
Compare
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 is amazing -- thank you @ngli-me and @berkaysynnada
I think we can make it even better and remove LexOrderingRef
in favor of &LexOrdering
but we can do so as a follow on PR.
I am exploring how to do this
Thank you again @ngli-me and @berkaysynnada I filed some follow on work:
I also double checked that when I merged this branch up to main it still passed all its tests |
Which issue does this PR close?
Closes #12591.
Rationale for this change
What changes are included in this PR?
Adds
LexOrdering
as a struct, instead of a type.Replaces previous occurrences of
LexOrdering
of thetype
withstruct
where appropriate.Replaces
&[PhysicalSortExpr]
with the typeLexOrderingRef
, where appropriate.Aligns printing for
LexOrdering
, since some instances of aPhysicalSortExpr
were being printed with,
, and others with,
. Changed printing over to the latter, since this seems to align more with other instances of printing multiple items.Are these changes tested?
Yes, adjusted tests where necessary.
Are there any user-facing changes?
The Vec needs to be wrapped to initialize the struct instance, and some of the usage needs to be adjusted to get the field from the struct.