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

   ### Describe the bug
   
   I noticed `IN` expr doesn't work with multiple items under the following 
conditions.
   
   1. The left side operand of `IN` is a literal, the number of items in the 
list is greater than 1 and at least one of the items is a non-literal.
   ```
   CREATE TABLE mytbl(a INT, b INT) AS VALUES (1, 2);
   SELECT 1 in (a, b) FROM mytbl;
   Execution error: InList expression must evaluate to a scalar
   ```
   
   2. The left side operand of `IN` is a non-literal  and the number of items 
in the list is greater than 3.
   ```
   CREATE TABLE mytbl(a INT, b INT, c INT, d INT, e INT) AS VALUES (1, 2, 3, 4, 
5);
   SELECT a IN (b, c, d, e) FROM mytbl;
   Execution error: InList expression must evaluate to a scalar
   ```
   
   
   ### 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: [email protected]

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

Reply via email to