WIP: Adaptive selection of join algorithm#818
Draft
wence- wants to merge 14 commits intorapidsai:mainfrom
Draft
Conversation
Sample a small number of chunks from each side to estimate input size. The goal is to make an early join-strategy choice without stalling the pipeline or buffering whole inputs. This adds an allgather so the estimate reflects all ranks while keeping the local sample size minimal.
Exploring how to manage approximate channel message counts in an actor network.
We need to break the outer loop, not the inner one.
Having buffered some messages to inspect for size estimation we need to replay the full channel to interact with the broadcast and shuffle nodes. We do this by creating an output channel and sending in first the buffered messages and then consuming the remainder of the output channel.
Using the new channel replay, and with statistics gathered from the buffered messages, dispatch to either a broadcast join or a shuffle join depending on the estimated sizes of the two tables.
Use broadcast side to drive output column ordering and build/probe carrier selection via filtered views. Replace the duplicate join chunk helpers and update callers.
To enable adaptive algorithms in query operator nodes, we will often need some kind of metadata about the messages in a channel. Minimally we typically need the number of expected messages that are being sent. Rather than carrying a separate object around for metadata, give each Channel a metadata queue that can be pushed into by producers. We use a queue so that we can push in multiple messages without suspending on the produce side.
72438b4 to
76bdb97
Compare
|
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.