Expr formatting missing parentheses
- Dominant language
- Rust
- Stars
- 9.3k
- Forks
- 2.4k
- Avg merge
- 3d 7h
- Merged PRs (30d)
- 344
Description
### Describe the bug
In datafusion-cli:
```
> select (1+2)*3;
+--------------------------------+
| Int64(1) + Int64(2) * Int64(3) |
+--------------------------------+
| 9 |
+--------------------------------+
```
The expression displayed in the plan is misleading due to the missing parentheses.
### To Reproduce
_No response_
### Expected behavior
Always include parentheses for binary expressions
### Additional context
Maybe we are also missing `()` for other expression types like unary expression
Contributor guide
Research direction
Start in the expression-formatting path used by datafusion-cli and reproduce the shown `select (1+2)*3;` query. Check how binary expressions are rendered in the displayed plan; done means the output preserves parentheses and any affected unary-expression cases are covered.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust, sql
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100