alamb commented on issue #6635:
URL: 
https://github.com/apache/arrow-datafusion/issues/6635#issuecomment-1846114004

   I think the idea is that 
   
   | col1 | col2 |
   |--------|--------|
   | A | 1 |
   | B | 2 |
   | C | 3 | 
   
   So a query like `SELECT * FROM t WHERE (col1, col2) IN (('A', 1), ('B', 2))`
   
   Rather than actually implementing a second dimension in `InExpr` we could 
potentially keep things simpler with a rewrite like this:
   
   ```
   SELECT * 
   FROM t 
   WHERE (struct(col1, col2)) IN (struct('A', 1)), struct ('B', 2))`
   ```
   
   Where the struct function does this:
   
   ```
   DataFusion CLI v33.0.0
   ❯ select struct('A', 1);
   +----------------------------+
   | struct(Utf8("A"),Int64(1)) |
   +----------------------------+
   | {c0: A, c1: 1}             |
   +----------------------------+
   ```
   
   This would likely be a much simpler implementation and would be faster than 
the chained or shown above
   
   
   
   


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