Skip to content

Commit

Permalink
sql: remove planDataSource
Browse files Browse the repository at this point in the history
The `planDataSource` struct is no longer needed. It has been removed.

Release note: None
  • Loading branch information
mgartner committed Dec 20, 2024
1 parent 293bdde commit 2d3914f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 32 deletions.
1 change: 0 additions & 1 deletion pkg/sql/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ go_library(
"create_type.go",
"create_view.go",
"created_sequence.go",
"data_source.go",
"database.go",
"database_region_change_finalizer.go",
"deallocate.go",
Expand Down
18 changes: 0 additions & 18 deletions pkg/sql/data_source.go

This file was deleted.

19 changes: 6 additions & 13 deletions pkg/sql/opt_exec_factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -207,14 +207,6 @@ func (ef *execFactory) constructVirtualScan(
)
}

func asDataSource(n exec.Node) planDataSource {
plan := n.(planNode)
return planDataSource{
columns: planColumns(plan),
plan: plan,
}
}

// ConstructFilter is part of the exec.Factory interface.
func (ef *execFactory) ConstructFilter(
n exec.Node, filter tree.TypedExpr, reqOrdering exec.OutputOrdering,
Expand Down Expand Up @@ -1144,13 +1136,14 @@ func (ef *execFactory) ConstructRecursiveCTE(
func (ef *execFactory) ConstructProjectSet(
n exec.Node, exprs tree.TypedExprs, zipCols colinfo.ResultColumns, numColsPerGen []int,
) (exec.Node, error) {
src := asDataSource(n)
cols := append(src.columns, zipCols...)
p := n.(planNode)
cols := planColumns(p)
allCols := append(cols, zipCols...)
return &projectSetNode{
source: src.plan,
source: p,
projectSetPlanningInfo: projectSetPlanningInfo{
columns: cols,
numColsInSource: len(src.columns),
columns: allCols,
numColsInSource: len(cols),
exprs: exprs,
numColsPerGen: numColsPerGen,
},
Expand Down

0 comments on commit 2d3914f

Please sign in to comment.