-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sql: add plumbing for phys plan creation directly in execbuilder
This commit introduces `planMaybePhysical` utility struct that represents a plan and uses either planNode ("logical) or DistSQL spec ("physical") representations. It will be removed once we are able to create all processor spec in execbuilder directly. This struct has been plumbed in all places that need to look at the plan, but in most of them only the logical representation is supported. However, the main codepath for executing a statement supports both, and if physical representation is used, then we bypass distsql physical planner. This commit also renames `checkSupportForNode` to `checkSupportForPlanNode` and `createPlanForNode` to `createPhysPlanForPlanNode` to make their purpose more clear. At the moment, if experimental distsql planning is enabled, we will use the execbuilder-driven DistSQL spec creation only for SELECT statements (which is checked using a simple string-matching heuristic). We do it this way because table reader is the first spec to be implemented in execbuilder. We could introduce a fallback to "old" code path of planNode-based factory, but I'm worried that will be hiding errors in the "new" path. Release note: None
- Loading branch information
1 parent
d103a98
commit 63ba4b3
Showing
15 changed files
with
240 additions
and
121 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.