Skip to content

Commit d86d74d

Browse files
committed
sql: remove no longer used StubTableStats function
Release note: None
1 parent e6ae789 commit d86d74d

File tree

1 file changed

+0
-26
lines changed

1 file changed

+0
-26
lines changed

pkg/sql/create_stats.go

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -92,32 +92,6 @@ var errorOnConcurrentCreateStats = settings.RegisterBoolSetting(
9292

9393
const nonIndexColHistogramBuckets = 2
9494

95-
// StubTableStats generates "stub" statistics for a table which are missing
96-
// statistics on virtual computed columns, multi-column stats, and histograms,
97-
// and have 0 for all values.
98-
func StubTableStats(
99-
desc catalog.TableDescriptor, name string,
100-
) ([]*stats.TableStatisticProto, error) {
101-
colStats, err := createStatsDefaultColumns(
102-
context.Background(), desc,
103-
false /* virtColEnabled */, false, /* multiColEnabled */
104-
false /* nonIndexJSONHistograms */, false, /* partialStats */
105-
nonIndexColHistogramBuckets, nil, /* evalCtx */
106-
)
107-
if err != nil {
108-
return nil, err
109-
}
110-
statistics := make([]*stats.TableStatisticProto, len(colStats))
111-
for i, colStat := range colStats {
112-
statistics[i] = &stats.TableStatisticProto{
113-
TableID: desc.GetID(),
114-
Name: name,
115-
ColumnIDs: colStat.ColumnIDs,
116-
}
117-
}
118-
return statistics, nil
119-
}
120-
12195
// createStatsNode is a planNode implemented in terms of a function. The
12296
// runJob function starts a Job during Start, and the remainder of the
12397
// CREATE STATISTICS planning and execution is performed within the jobs

0 commit comments

Comments
 (0)