alamb commented on issue #11055:
URL: https://github.com/apache/datafusion/issues/11055#issuecomment-2184954245

   
   
   I agree with @Lordworms the root cause is related to the precidence rules in 
sqlparser which control if expressions like
   
   ```sl
     DATE '2019-02-28' + INTERVAL '1 YEAR' + INTERVAL '1 DAY' AS FEB,
   ```
   
   are parsed like this
   
   ```sql
     ((DATE '2019-02-28' + INTERVAL '1 YEAR') + INTERVAL '1 DAY' AS FEB),
   ```
   
   Or like
   ```sql
     (DATE '2019-02-28' + (INTERVAL '1 YEAR' + INTERVAL '1 DAY' AS FEB)),
   ```
   
   Users who want to control the order of expression evaluation can use `(` and 
`)` to explicitly control the evaluation order.


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