mingmwang commented on PR #6372:
URL: 
https://github.com/apache/arrow-datafusion/pull/6372#issuecomment-1558414046

   > FYI I don't think this closes #3667
   > 
   > I tried the reproducer in that ticket with this branch and it still errors
   > 
   > ```shell
   > $ echo "1,2" > /tmp/test.csv
   > $ cd arrow-datafusion/datafusion-cli
   > $ cargo run
   >     Finished dev [unoptimized + debuginfo] target(s) in 0.94s
   >      Running `/Users/alamb/Software/target-df/debug/datafusion-cli`
   > DataFusion CLI v24.0.0
   > ❯ create external table test (a decimal(10,2), b decimal(10,2)) stored as 
csv location '/tmp/test.csv';
   > 0 rows in set. Query took 0.004 seconds.
   > ❯ select * from test where a between (select distinct a from test) and 
(select distinct b from test);
   > This feature is not implemented: Physical plan does not support logical 
expression (<subquery>)
   > ```
   
   Yes, the query in the original ticket can not be de-correlated because the 
`select distinct` can not make sure to return a scalar value.
   
   ` select * from test where a between (select distinct a from test) and 
(select distinct b from test);`
   
   What this ticket closed is a patten like below:
   
   ` select * from test where a between (select min (a) from test) and (select  
max(b) from test);`


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