datafusion icon indicating copy to clipboard operation
datafusion copied to clipboard

Always add parentheses when formatting `BinaryExpr` with `SchemaDisplay`

Open hendrikmakait opened this issue 7 months ago • 8 comments

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 BinaryExpr via SchemaDisplay

Are these changes tested?

Yes, added a regression test

Are there any user-facing changes?

No

hendrikmakait avatar May 29 '25 16:05 hendrikmakait

Given how widely used this code is I suspect this change will be quite invasive / require changing many tests

alamb avatar May 30 '25 10:05 alamb

@hendrikmakait Hi, there are still a few places that need to change

xudong963 avatar Jun 03 '25 08:06 xudong963

@xudong963: CI is green now.

hendrikmakait avatar Jun 04 '25 12:06 hendrikmakait

@xudong963: CI is green now.

cc @alamb for another look

xudong963 avatar Jun 04 '25 14:06 xudong963

@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.

hendrikmakait avatar Jun 06 '25 08:06 hendrikmakait

@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

alamb avatar Jun 08 '25 11:06 alamb

Sounds good, I'll take care of that when I have some more time next week.

hendrikmakait avatar Jun 09 '25 11:06 hendrikmakait

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

alamb avatar Jun 16 '25 21:06 alamb

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.

github-actions[bot] avatar Aug 21 '25 02:08 github-actions[bot]