alamb commented on issue #5265:
URL: https://github.com/apache/datafusion/issues/5265#issuecomment-2423193732
Here is a full reproducer:
```shell
echo "1,2" > data.csv
```
The run sql
```sql
> create external table t1(t1_id int, t2_name int) stored as csv location
'data.csv';
0 row(s) fetched.
Elapsed 0.019 seconds.
> create external table t2(t2_id int, t2_name int) stored as csv location
'data.csv';
0 row(s) fetched.
Elapsed 0.007 seconds.
> explain select * from t1 where exists(select 1 from t2 where t2.t2_id > 0);
+---------------+-------------------------------------------------------------------------------------------------------------------------------------------------+
| plan_type | plan
|
+---------------+-------------------------------------------------------------------------------------------------------------------------------------------------+
| logical_plan | TableScan: t1 projection=[t1_id, t2_name],
full_filters=[EXISTS (<subquery>)]
|
| | Subquery:
|
| | Projection: Int64(1)
|
| | Filter: CAST(t2.t2_id AS Int64) > Int64(0)
|
| | TableScan: t2
|
| physical_plan | CsvExec: file_groups={1 group:
[[Users/andrewlamb/Software/datafusion2/datafusion-cli/data.csv]]},
projection=[t1_id, t2_name], has_header=true |
| |
|
+---------------+-------------------------------------------------------------------------------------------------------------------------------------------------+
2 row(s) fetched.
Elapsed 0.019 seconds.
```
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]