caseykneale opened a new issue, #7420:
URL: https://github.com/apache/arrow-datafusion/issues/7420
### Describe the bug
I have a query like:
```SQL
SELECT a.foreign_key, a.parent_type FROM table_a AS a
LEFT JOIN table_b AS b
ON a.thing = b.thing
AND a.parent_type = 'OneOption'
AND b.parent_type = 'OneOption'
AND a.is_thing = TRUE
AND b.is_thing = TRUE
```
Unfortunately, when I run this query I see the results for all `parent_type`
values rather than being exclusive to one as specified in the subqueries. I
will see "OneOption", "TwoOption", etc. Meaning, the filter on the parent_type
column is not working. I am able to add a WHERE clauses to filter after the
joins which is less than ideal, but an acceptable workaround. Maybe I can make
subqueries with the filtration step before the join as well.
### To Reproduce
Make a small CSV file containing the fields specified in the query, run the
query and observe that filtration does not work on Left Joins. Load the same
CSV in as table_a and table_b to a SessionContext.
### Expected behavior
Filtering on Left Joins allows for filtration via AND statements.
### 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]