Always add parentheses when formatting `BinaryExpr` with `SchemaDisplay`
Which issue does this PR close?
- Closes https://github.com/apache/datafusion/issues/16054.
Rationale for this change
What changes are included in this PR?
- Adds a regression test
- Always add parentheses when formatting
BinaryExprvia SchemaDisplay
Are these changes tested?
Yes, added a regression test
Are there any user-facing changes?
No
Given how widely used this code is I suspect this change will be quite invasive / require changing many tests
@hendrikmakait Hi, there are still a few places that need to change
@xudong963: CI is green now.
@xudong963: CI is green now.
cc @alamb for another look
@alamb: That's a fair point, I actually brought it up in the issue (https://github.com/apache/datafusion/issues/16054#issuecomment-2924301139). I'm happy to adjust the implementation.
@alamb: That's a fair point, I actually brought it up in the issue (#16054 (comment)). I'm happy to adjust the implementation.
I think we should try to adjust if possible. Thank you @hendrikmakait
Sounds good, I'll take care of that when I have some more time next week.
Marking as draft as I think this PR is no longer waiting on feedback and I am trying to make it easier to find PRs in need of review. Please mark it as ready for review when it is ready for another look
Thank you for your contribution. Unfortunately, this pull request is stale because it has been open 60 days with no activity. Please remove the stale label or comment or this will be closed in 7 days.