-
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
Improve documentation and add Display
impl to EquivalenceProperties
#12590
Conversation
f0a4501
to
825e4fc
Compare
825e4fc
to
381b468
Compare
/// PhysicalSortExpr::new_default(col_c).desc(), | ||
/// ]); | ||
/// | ||
/// assert_eq!(eq_properties.to_string(), "order: [a@0 ASC,c@2 DESC], const: [b@1]") |
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 shows the example of the Display property I wanted -- that shows the columns in a reasonably human friendly way
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.
381b468
to
9fc7178
Compare
9fc7178
to
f300930
Compare
FWY @wiedld |
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.
Following the equivalence logs is also hard for me, thanks @alamb. This is very nice.
Thank you for the review @berkaysynnada |
Which issue does this PR close?
Part of #12446
Closes #.
Rationale for this change
Basically while working on #12562 I found printing out and understanding
EquivalenceProperties
to be hard and I really liked the way @berkaysynnada formatted them in the comments here #12446 (comment)For example:
What changes are included in this PR?
EquivalenceProperties
in an easier to use wayEquivalenceProperties::add_constants
toEquivalenceProperties::with_constants
so it conforms to an API that consumesself
(leaving a deprecatedEquivalenceProperties::add_constants
to assist migration)Are these changes tested?
Yes, by CI and doc tests
Are there any user-facing changes?
Better docs, easier to use APIs.
No API changes, but I deprecated
add_constants
and addedwith_constants