andygrove opened a new issue, #3646:
URL: https://github.com/apache/arrow-datafusion/issues/3646

   **Describe the bug**
   
   Postgres:
   
   ```
   select * from test where a between (select distinct a from test) and (select 
distinct b from test);
     a   |  b   
   ------+------
    1.00 | 2.00
   (1 row)
   ```
   
   DataFusion:
   
   ```
   select * from test where a between (select distinct a from test) and (select 
distinct b from test);
   
   Internal("Optimizer rule 'type_coercion' failed due to unexpected error: 
Internal error: Failed to coerce types Decimal128(10, 2) and Boolean in BETWEEN 
expression. This was likely caused by a bug in DataFusion's code and we would 
welcome that you file an bug report in our issue tracker")
   ```
   
   **To Reproduce**
   As shown.
   
   **Expected behavior**
   Should work.
   
   **Additional context**
   None
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to