-
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
fix: misc phys. expression display bugs #5387
Conversation
This is useful in other contexts as well, e.g. for formatting phys. expressions.
Found while working on apache#4695.
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.
The new format looks pretty 🤩
lit(ScalarValue::from(4)), | ||
)), | ||
); | ||
assert_eq!(expr.to_string(), "(1 OR 2) AND (3 OR 4)"); |
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.
👍
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.
The new format looks pretty star_struck
Agreed
Benchmark runs are scheduled for baseline = ac33ebc and contender = cef119d. cef119d is a master commit associated with this PR. Results will be available as each benchmark for each run completes. |
Which issue does this PR close?
Found while working on #4695.
Rationale for this change
Broken display code makes debugging and testing hard.
What changes are included in this PR?
TryCast
should display asTRY_CAST
, not asCAST
BinaryExpr
should use parenthesisAre these changes tested?
precedence
from logical binary expression toOperator
, so I can reuse this in the phys. expr. display codeAre there any user-facing changes?
Slight changes in debug outputs.
Breaking:
BinaryExpr::precedence
is gone