2010YOUY01 commented on issue #16054:
URL: https://github.com/apache/datafusion/issues/16054#issuecomment-2924301139

   > I've had a closer look, we simply wrap `- {foo}` in parentheses regardless 
of whether that's strictly necessary. Following the same principle for 
`BinaryExpr` won't look as pretty as it could, but it would always be correct. 
To avoid adding parentheses when not necessary, we'd have to pass more 
information into `SchemaDisplay`. We'd need to be able to access the parent's 
precedence to make a decision.
   
   Thank you for the help. `DuckDB` also always add parentheses (e.g. 
`(-(1+2))`), I think it's good enough. Trying to only display the necessary 
parentheses might not worth the effort.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org

Reply via email to