Support dynamic filters via remote scanner #4077
Open
+107
−5
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Dynamic filters massively reduce the number of rows returned in topk operations like 'get the 50 most recent invocations'. They are not particularly helpful locally however, as we have to add a row to a record batch to be able to apply a filter, and at this point we have done 99% of the work of the scan. But remotely, they allow us to send less rows over the wire, which is valuable.
In handle_child_pushdown_result we track any dynamic filters and combine them with our initial filter. Then we are able to snapshot the dynamic filters and send them over the wire when they change, so on the remote side a stricter filter can be applied