You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/07/04 13:18:07 UTC

[GitHub] [arrow-datafusion] liukun4515 commented on issue #2799: coercion rule about `eq` and InList between string type and numeric type

liukun4515 commented on issue #2799:
URL: https://github.com/apache/arrow-datafusion/issues/2799#issuecomment-1173812564

   > Here is what postgres does (appears to me to cast based on the type of the first element in the IN list):
   > 
   > ```
   > alamb=# select 5 in (1, 2, 'fff');
   > ERROR:  invalid input syntax for type integer: "fff"
   > LINE 1: select 5 in (1, 2, 'fff');
   >                            ^
   > alamb=# select 'foo' in (1, 2, 'fff');
   > ERROR:  invalid input syntax for type integer: "fff"
   > LINE 1: select 'foo' in (1, 2, 'fff');
   >                                ^
   > alamb=# select 'foo' in ('1', '2', 'fff');
   >  ?column? 
   > ----------
   >  f
   > (1 row)
   > ```
   
   Do you try  this?
   ```
   select 1 in (12,1,3,'123');
   ```


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