Skip to content

Conversation

@jackkleeman
Copy link
Contributor

@jackkleeman jackkleeman commented Dec 1, 2025

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

@github-actions
Copy link

github-actions bot commented Dec 1, 2025

Test Results

  7 files  +  2    7 suites  +2   3m 22s ⏱️ + 2m 6s
 47 tests + 13   47 ✅ + 13  0 💤 ±0  0 ❌ ±0 
200 runs  +148  200 ✅ +148  0 💤 ±0  0 ❌ ±0 

Results for commit 95383dc. ± Comparison against base commit bbf4d42.

This pull request removes 34 and adds 47 tests. Note that renamed tests count towards both.
dev.restate.sdktesting.tests.AwakeableIngressEndpointTest ‑ completeWithFailure(Client)
dev.restate.sdktesting.tests.AwakeableIngressEndpointTest ‑ completeWithSuccess(Client)
dev.restate.sdktesting.tests.BackwardCompatibilityTest$NewVersion ‑ completeAwakeable(Client)
dev.restate.sdktesting.tests.BackwardCompatibilityTest$NewVersion ‑ completeRetryableOperation(Client)
dev.restate.sdktesting.tests.BackwardCompatibilityTest$NewVersion ‑ proxyCallShouldBeDone(Client)
dev.restate.sdktesting.tests.BackwardCompatibilityTest$NewVersion ‑ proxyOneWayCallShouldBeDone(Client)
dev.restate.sdktesting.tests.BackwardCompatibilityTest$OldVersion ‑ createAwakeable(Client)
dev.restate.sdktesting.tests.BackwardCompatibilityTest$OldVersion ‑ startOneWayProxyCall(Client)
dev.restate.sdktesting.tests.BackwardCompatibilityTest$OldVersion ‑ startProxyCall(Client)
dev.restate.sdktesting.tests.BackwardCompatibilityTest$OldVersion ‑ startRetryableOperation(Client)
…
dev.restate.sdktesting.tests.CallOrdering ‑ ordering(boolean[], Client)[1]
dev.restate.sdktesting.tests.CallOrdering ‑ ordering(boolean[], Client)[2]
dev.restate.sdktesting.tests.CallOrdering ‑ ordering(boolean[], Client)[3]
dev.restate.sdktesting.tests.Cancellation ‑ cancelFromAdminAPI(BlockingOperation, Client, URI)[1]
dev.restate.sdktesting.tests.Cancellation ‑ cancelFromAdminAPI(BlockingOperation, Client, URI)[2]
dev.restate.sdktesting.tests.Cancellation ‑ cancelFromAdminAPI(BlockingOperation, Client, URI)[3]
dev.restate.sdktesting.tests.Cancellation ‑ cancelFromContext(BlockingOperation, Client)[1]
dev.restate.sdktesting.tests.Cancellation ‑ cancelFromContext(BlockingOperation, Client)[2]
dev.restate.sdktesting.tests.Cancellation ‑ cancelFromContext(BlockingOperation, Client)[3]
dev.restate.sdktesting.tests.Combinators ‑ awakeableOrTimeoutUsingAwakeableTimeoutCommand(Client)
…

♻️ This comment has been updated with latest results.

Base automatically changed from push-yozxxoozlkwl to main December 11, 2025 17:57
Copy link
Contributor

@igalshilman igalshilman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks 🔥

if current_predicate_generation != predicate_generation {
predicate_generation = current_predicate_generation;
Some(RemoteQueryScannerPredicate {
serialized_physical_expression: encode_expr(predicate)?,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • do you know what is the typical size of this, surely small-ish, just making sure.
  • do you know how often we are expected to enter that branch? is it configurable?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

small yeah - status = "completed" encodes to 33 bytes

i think in the topk case we will probably enter it every batch, as each batch that arrives at the topk exec will update the min or the max and lead to a tighter bound

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants