berkaysynnada commented on PR #15566:
URL: https://github.com/apache/datafusion/pull/15566#issuecomment-2796643229
So, joins are like this (this example for joins which prefer keeping all
filter expressions inside themselves)
```
fn try_pushdown_filters(&self, fd: FilterDescription) ->
Result<FilterPushdownResult> {
// collect all filters
let mut all_filters = fd;
all_filters.extend(self.filter);
let mut self_filters = vec![];
let mut left_filters = vec![];
let mut right_filters = vec![];
// extract child filters
for filter in all_filters {
if all_left_columns(filter) {
left_filters.push(filter);
} else if all_right_columns(filter) {
right_filters.push(filter);
} else {
self_filters.push(filter);
}
}
// get the new join with updated filter expressions:
let new_self = Join::try_new(self.left_input, self.right_input, ...,
filter: self_filters);
FilterPushdownResult {child_filters: vec![left_filters, right_filters],
remaining_filters: [], operator: new_self}
}
```
--
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]