Skip to content

Commit

Permalink
sql: operate on pointers to PhysicalPlan
Browse files Browse the repository at this point in the history
This commit changes `createPlanFor*` methods to operate on pointers to
`PhysicalPlan` instead of values. It also renames and cleans up some
explain-related utility methods.

Release note: None
  • Loading branch information
yuzefovich committed Jun 2, 2020
1 parent be7d9f2 commit ed4ff47
Show file tree
Hide file tree
Showing 9 changed files with 132 additions and 132 deletions.
8 changes: 4 additions & 4 deletions pkg/sql/create_stats.go
Original file line number Diff line number Diff line change
Expand Up @@ -348,14 +348,14 @@ func makeColStatKey(cols []sqlbase.ColumnID) string {
return colSet.String()
}

// makePlanForExplainDistSQL is part of the distSQLExplainable interface.
func (n *createStatsNode) makePlanForExplainDistSQL(
// newPlanForExplainDistSQL is part of the distSQLExplainable interface.
func (n *createStatsNode) newPlanForExplainDistSQL(
planCtx *PlanningCtx, distSQLPlanner *DistSQLPlanner,
) (PhysicalPlan, error) {
) (*PhysicalPlan, error) {
// Create a job record but don't actually start the job.
record, err := n.makeJobRecord(planCtx.ctx)
if err != nil {
return PhysicalPlan{}, err
return nil, err
}
job := n.p.ExecCfg().JobRegistry.NewJob(*record)

Expand Down
Loading

0 comments on commit ed4ff47

Please sign in to comment.