New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add ids to logical plans #13525
Add ids to logical plans #13525
Conversation
58aa365
to
0cd5cda
Compare
@@ -43,11 +44,12 @@ public SubqueryPlanner(Function<SelectSymbol, LogicalPlan> planSubSelects) { | |||
|
|||
public record SubQueries(Map<LogicalPlan, SelectSymbol> uncorrelated, Map<SelectSymbol, LogicalPlan> correlated) { | |||
|
|||
public LogicalPlan applyCorrelatedJoin(LogicalPlan source) { | |||
public LogicalPlan applyCorrelatedJoin(LogicalPlan source, IntSupplier ids) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am trying to use IntSupplier () -> Int
instead of the PlannerContext if possible, as it's simply much less hassle to build and to handle e.g. in tests.
LogicalPlan apply(T plan, | ||
Captures captures, | ||
TableStats tableStats, | ||
TransactionContext txnCtx, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could introduce a RuleContext including TransactionContext, NodeContext and PlannerContext and TableStats.
0cd5cda
to
69f28b6
Compare
This assigns to each logical plan node an id as part of the planning phase. This makes logical plans identifiable. This is useful for keeping track of changes on the logical operator node tree. Main concepts: - Each newly created logical plan gets a new id - Id's of logical plans have to be unique within one planning phase - When a logical plan is modified e.g. by a rule transformation it will get a new id - An incrementing int on the planner context is used to generate the ids This is a pre-requisite for the iterative optimizer #13340
69f28b6
to
689ee45
Compare
Converting back to draft. I would like to do one more iteration. |
This assigns to each logical plan node an id as part of the planning phase. This makes logical plans identifiable. This is useful for keeping track of changes on the logical operator node tree.
Main concepts:
This is a pre-requisite for the iterative optimizer #13340
Summary of the changes / Why this improves CrateDB
Checklist
CHANGES.txt
for user facing changessql_features
table for user facing changesCHANGES.txt
(E.g. AdminUI)