nuno-faria commented on PR #17153:
URL: https://github.com/apache/datafusion/pull/17153#issuecomment-3189444721
Thanks @adriangb for working on this.
I think it would be nice to add a sqllogictest example showing the pushdown.
Here is an example:
```sql
copy (select i as k from generate_series(1, 10) t(i)) to 't1.parquet';
copy (select i as k, i as v from generate_series(1, 100) t(i)) to
't2.parquet';
create external table t1 stored as parquet location 't1.parquet';
create external table t2 stored as parquet location 't2.parquet';
select *
from t1
where k in (
select k
from t2
where t2.v >= 10
);
```
However, I noticed that the filter is being pushed down to the wrong table:
```sql
HashJoinExec
DataSourceExec t1.parquet -- should be added to t1
DataSourceExec t2.parquet predicate=v@1 >= 10 AND
DynamicFilterPhysicalExpr [ k@0 >= 1 AND k@0 <= 10 ]
```
I checked and it is also happening with inner joins
(https://github.com/apache/datafusion/issues/17196), so its probably not
related to this specific PR.
--
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]