Open walterddr opened 1 year ago
Nice. Will review
FYI @vvivekiyer
step 1a and 1b are done via (#10665, #10673) and (#10681, #10669)
collecting some feedback from folks, please feel free to comment below as well:
Parser should be part of the external of planner so that
We should consider making the component modules so that it doesn't need to force dependency on some other packages, for example:
Planner
-> LogicalPlanner
:
where does some planning info to
PinotQueryPlanner and Plan should be a separate module
Background
Currently we have multiple abstractions reused with different components in planner and runtime. it causes several problems
These are related with partition strategy, worker assignment and mailbox-pipeline breaker efforts
Proposed changes === Several abstract is being introduced and will replace the current abstract
VirtualServer
VirtualServer
is now aServerInstance + VirtualID
, it will be replaced withWorker
which is indicating parallelism of work. It: (1) is globally indexed per stage; (2) mapped to a singleServerInstance
stored inStageMetadata
, (3) contains partition or segment info which will be put into a new abstract called:WorkerMetadata
with this
VirtualServer
is completely removed, and we decoupledServerInstance
which is not useful in runtime fromVirtualID
/workerID
which is used in runtime.Step 1b: replace identifiers:
MailboxIdentifier
will useworkerID
which is globally indexed to uniquely identify a stream as:reqID|sendingStageID|sendingWorkerID|receivingStageID|receivingStageWorkerID
OpChainID
will useWorkerID
as wellreqID|stageID|workerID
Step 2: rename the API abstractions once it is clean
API/Class abstraction definitions
Here is a global view of what we need in terms of primitives
The Yellow objects with POJO definitions are what we plan to introduce, specifically:
Broker
Plan
(orQueryPlan
) - represents a converted format from Calcite'sRelNode
RelNode
is being 1-1 converted toPlanNode
(originally named asStageNode
we decided to rename it b/c it is not necessarily associated with aStage
PlanMetadata
SubPlan
- represents a part of the entirePlan
that will be executed at a time. (This is a placeholder for now, it is used to pipelined execution in the future)SubPlan
should be executed first before the current subPlanRootPlanFragment
PlanFragment
- represents a logical execution unit that can be executed at a time. (originally named as aStage
)PlanFragment
s.DispatchablePlan
- represents aPlanFragment
+ physical dispatch info to a specificWorker
WorkerMetadata
that contains the physical execution info.Server
StagePlan
- represents the format of theDispatchablePlan
on server (originally namedDistributedStagePlan
)DispatchablePlan
that's needed by server.OpChain
- this is not changedCC @Jackie-Jiang @xiangfu0 @ankitsultana @somandal @siddharthteotia