Repository navigation
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.
waynexia
left a comment
There was a problem hiding this comment.
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.
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?
TryCastshould display asTRY_CAST, not asCASTBinaryExprshould use parenthesisAre these changes tested?
precedencefrom 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::precedenceis gone