Remix.run Logo
▲ gopalv 2 hours ago

> Instead of joining the tables completely and sorting at the end, a Rank Join streams its inputs in descending score order (sorted access, or SA), building candidate result-sets as it goes.

Your algorithm feels like a variant of the WAND algorithm the Snowflake Top-K pruning paper [1] pulls from.

You can go distributed with this approach if you have a "gossip" protocol between workers to distribute the heap boundaries periodically.

Before the AI age, a "papers we love" group was a great thing within any company.

Now, Claude or Codex will know the SOTA literature around a topic like this and "uniformly distribute" the past into every single implementation of a similar idea. The future isn't uniformly distributed, but the past is getting the treatment & that's good.

[1] - https://arxiv.org/html/2504.11540v1#S5

▲stuhood an hour ago | parent [-]

Yes! Search engines like Tantivy have long employed WAND to score across terms. The difference though is that WAND is not joining terms in descending order by score: rather, by doc-id.

This algorithm is closer to Fagin's Threshold Algorithm (also mentioned in your link): the Threshold Algorithm was the first iteration of a rank join.