Skip to content

Expr formatting missing parentheses #16054

Open
@2010YOUY01

Description

@2010YOUY01

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

Metadata

Metadata

Assignees

Labels

bugSomething isn't workinggood first issueGood for newcomers

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions