Improve documentation and add Display impl to EquivalenceProperties#12590
Merged
alamb merged 1 commit intoapache:mainfrom Sep 24, 2024
Merged
Improve documentation and add Display impl to EquivalenceProperties#12590alamb merged 1 commit intoapache:mainfrom
Display impl to EquivalenceProperties#12590alamb merged 1 commit intoapache:mainfrom
Conversation
f0a4501 to
825e4fc
Compare
825e4fc to
381b468
Compare
alamb
commented
Sep 23, 2024
| /// PhysicalSortExpr::new_default(col_c).desc(), | ||
| /// ]); | ||
| /// | ||
| /// assert_eq!(eq_properties.to_string(), "order: [a@0 ASC,c@2 DESC], const: [b@1]") |
Contributor
Author
There was a problem hiding this comment.
This shows the example of the Display property I wanted -- that shows the columns in a reasonably human friendly way
This was referenced Sep 23, 2024
381b468 to
9fc7178
Compare
9fc7178 to
f300930
Compare
Contributor
Author
|
FWY @wiedld |
berkaysynnada
approved these changes
Sep 24, 2024
Contributor
berkaysynnada
left a comment
There was a problem hiding this comment.
Following the equivalence logs is also hard for me, thanks @alamb. This is very nice.
Contributor
Author
|
Thank you for the review @berkaysynnada |
bgjackma
pushed a commit
to bgjackma/datafusion
that referenced
this pull request
Sep 25, 2024
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.

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
EquivalencePropertiesto 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?
EquivalencePropertiesin an easier to use wayEquivalenceProperties::add_constantstoEquivalenceProperties::with_constantsso it conforms to an API that consumesself(leaving a deprecatedEquivalenceProperties::add_constantsto 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_constantsand addedwith_constants