You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "jackwener (via GitHub)" <gi...@apache.org> on 2023/06/07 16:28:46 UTC
[GitHub] [arrow-datafusion] jackwener opened a new issue, #6589: Discuss: don't allow not() param is Literal
jackwener opened a new issue, #6589:
URL: https://github.com/apache/arrow-datafusion/issues/6589
### Describe the bug
I'm working for `type coercion`. I find
now
```sql
tests/sqllogictests/test_files/scalar.slt:914
query BB
SELECT not(1), not(0)
----
-2 -1
```
I don't know whether we should allow it. it break `type system`.
pg
```sql
psql:commands.sql:15: ERROR: argument of NOT must be type boolean, not type integer
LINE 1: SELECT not(1), not(0);
```
### To Reproduce
_No response_
### Expected behavior
_No response_
### Additional context
_No response_
--
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-unsubscribe@arrow.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow-datafusion] alamb commented on issue #6589: Discuss: don't allow not() param is Literal
Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on issue #6589:
URL: https://github.com/apache/arrow-datafusion/issues/6589#issuecomment-1581188677
FYI @izveigor who I think added this feature
I think `not(int)` means the same as `bitwisenot` -- aka `~ int` in postgres: https://www.postgresql.org/docs/9.4/functions-bitstring.html
I don't have any strong opinoion about supporting not(int) vs only `~`.
--
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-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow-datafusion] jackwener commented on issue #6589: Discuss: don't allow not() param is Literal
Posted by "jackwener (via GitHub)" <gi...@apache.org>.
jackwener commented on issue #6589:
URL: https://github.com/apache/arrow-datafusion/issues/6589#issuecomment-1581164769
cc @liukun4515 @alamb @Dandandan
--
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-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow-datafusion] alamb commented on issue #6589: Discuss: don't allow not() param is Literal
Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on issue #6589:
URL: https://github.com/apache/arrow-datafusion/issues/6589#issuecomment-1581264054
🤦
--
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-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow-datafusion] jackwener commented on issue #6589: Discuss: don't allow not() param is Literal
Posted by "jackwener (via GitHub)" <gi...@apache.org>.
jackwener commented on issue #6589:
URL: https://github.com/apache/arrow-datafusion/issues/6589#issuecomment-1581226503
if we let `not(int)` same with `bitwisenot`, there will be incompatibility at the point of processing NULL.
- `not(null)` is `true`
- `~(NULL:int)` is `null`
```sql
SELECT ~(NULL::int) is NULL;
-
t
SELECT not(NULL) is true;
-
t
```
--
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-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow-datafusion] liukun4515 commented on issue #6589: Discuss: don't allow not() param is `IntegerType`
Posted by "liukun4515 (via GitHub)" <gi...@apache.org>.
liukun4515 commented on issue #6589:
URL: https://github.com/apache/arrow-datafusion/issues/6589#issuecomment-1581799803
> cc @liukun4515 @alamb @Dandandan
I need more time to look at the current implementation.
--
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-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow-datafusion] jackwener commented on issue #6589: Discuss: don't allow not() param is `IntegerType`
Posted by "jackwener (via GitHub)" <gi...@apache.org>.
jackwener commented on issue #6589:
URL: https://github.com/apache/arrow-datafusion/issues/6589#issuecomment-1582176375
related PR #5902
--
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-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow-datafusion] alamb closed issue #6589: Discuss: don't allow not() param is `IntegerType`
Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb closed issue #6589: Discuss: don't allow not() param is `IntegerType`
URL: https://github.com/apache/arrow-datafusion/issues/6589
--
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-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org