comphead commented on PR #16798:
URL: https://github.com/apache/datafusion/pull/16798#issuecomment-3086629367

   > @comphead We're talking about implicit conversions
   > 
   > PG: postgres=# SELECT not(1); ERROR: argument of NOT must be type boolean, 
not type integer LINE 1: SELECT not(1);
   > 
   > This PR: query BB SELECT not(1), not(0)
   > 
   > false true
   
   Thanks @2010YOUY01 
   I agree for implicit conversion it might be confusing, DuckDB works 
   
   ```
   D select not(2);
   ┌─────────┐
   │ (NOT 2) │
   │ boolean │
   ├─────────┤
   │ false   │
   └─────────┘
   D select not(-1);
   ┌──────────┐
   │ (NOT -1) │
   │ boolean  │
   ├──────────┤
   │ false    │
   └──────────┘
   D select not(0);
   ┌─────────┐
   │ (NOT 0) │
   │ boolean │
   ├─────────┤
   │ true    │
   └─────────┘
   ```
   
   But IMHO we should stick to PG behavior
   
   


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