@@ -92,32 +92,6 @@ var errorOnConcurrentCreateStats = settings.RegisterBoolSetting(
92
92
93
93
const nonIndexColHistogramBuckets = 2
94
94
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
-
121
95
// createStatsNode is a planNode implemented in terms of a function. The
122
96
// runJob function starts a Job during Start, and the remainder of the
123
97
// CREATE STATISTICS planning and execution is performed within the jobs
0 commit comments