/
flags.go
243 lines (204 loc) · 6.22 KB
/
flags.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
// Code generated by the feature package; DO NOT EDIT.
package feature
import (
"context"
"github.com/influxdata/flux/internal/pkg/feature"
)
type (
Flag = feature.Flag
Flagger = feature.Flagger
StringFlag = feature.StringFlag
FloatFlag = feature.FloatFlag
IntFlag = feature.IntFlag
BoolFlag = feature.BoolFlag
)
var aggregateTransformationTransport = feature.MakeBoolFlag(
"Aggregate Transformation Transport",
"aggregateTransformationTransport",
"Jonathan Sternberg",
false,
)
// AggregateTransformationTransport - Enable Transport interface for AggregateTransformation
func AggregateTransformationTransport() BoolFlag {
return aggregateTransformationTransport
}
var groupTransformationGroup = feature.MakeBoolFlag(
"Group Transformation Group",
"groupTransformationGroup",
"Sean Brickley",
false,
)
// GroupTransformationGroup - Enable GroupTransformation interface for the group function
func GroupTransformationGroup() BoolFlag {
return groupTransformationGroup
}
var queryConcurrencyLimit = feature.MakeIntFlag(
"Query Concurrency Limit",
"queryConcurrencyLimit",
"Jonathan Sternberg",
0,
)
// QueryConcurrencyLimit - Sets the query concurrency limit for the planner
func QueryConcurrencyLimit() IntFlag {
return queryConcurrencyLimit
}
var optimizeUnionTransformation = feature.MakeBoolFlag(
"Optimize Union Transformation",
"optimizeUnionTransformation",
"Jonathan Sternberg",
false,
)
// OptimizeUnionTransformation - Optimize the union transformation
func OptimizeUnionTransformation() BoolFlag {
return optimizeUnionTransformation
}
var vectorizedMap = feature.MakeBoolFlag(
"Vectorized Map",
"vectorizedMap",
"Jonathan Sternberg",
false,
)
// VectorizedMap - Enables the version of map that supports vectorized functions
func VectorizedMap() BoolFlag {
return vectorizedMap
}
var narrowTransformationDifference = feature.MakeBoolFlag(
"Narrow Transformation Difference",
"narrowTransformationDifference",
"Markus Westerlind",
false,
)
// NarrowTransformationDifference - Enable the NarrowTransformation implementation of difference
func NarrowTransformationDifference() BoolFlag {
return narrowTransformationDifference
}
var narrowTransformationFill = feature.MakeBoolFlag(
"Narrow Transformation Fill",
"narrowTransformationFill",
"Sunil Kartikey",
false,
)
// NarrowTransformationFill - Enable the NarrowTransformation implementation of Fill
func NarrowTransformationFill() BoolFlag {
return narrowTransformationFill
}
var optimizeAggregateWindow = feature.MakeBoolFlag(
"Optimize Aggregate Window",
"optimizeAggregateWindow",
"Jonathan Sternberg",
false,
)
// OptimizeAggregateWindow - Enables a version of aggregateWindow written in Go
func OptimizeAggregateWindow() BoolFlag {
return optimizeAggregateWindow
}
var narrowTransformationLimit = feature.MakeBoolFlag(
"Narrow Transformation Limit",
"narrowTransformationLimit",
"Owen Nelson",
false,
)
// NarrowTransformationLimit - Enable the NarrowStateTransformation implementation of limit
func NarrowTransformationLimit() BoolFlag {
return narrowTransformationLimit
}
var optimizeStateTracking = feature.MakeBoolFlag(
"Optimize State Tracking",
"optimizeStateTracking",
"Sean Brickley",
false,
)
// OptimizeStateTracking - Enable implementation of NarrowStateTransformation of stateTracking
func OptimizeStateTracking() BoolFlag {
return optimizeStateTracking
}
var vectorizeLogicalOperators = feature.MakeBoolFlag(
"Vectorize Logical Operators",
"vectorizeLogicalOperators",
"Jonathan Sternberg",
false,
)
// VectorizeLogicalOperators - Vectorizes logical operators inside map
func VectorizeLogicalOperators() BoolFlag {
return vectorizeLogicalOperators
}
var labelPolymorphism = feature.MakeBoolFlag(
"Label polymorphism",
"labelPolymorphism",
"Markus Westerlind",
false,
)
// LabelPolymorphism - Enables label polymorphism in the type system
func LabelPolymorphism() BoolFlag {
return labelPolymorphism
}
var optimizeSetTransformation = feature.MakeBoolFlag(
"Optimize Set Transformation",
"optimizeSetTransformation",
"Jonathan Sternberg",
false,
)
// OptimizeSetTransformation - Enables a version of set that is optimized
func OptimizeSetTransformation() BoolFlag {
return optimizeSetTransformation
}
var unusedSymbolWarnings = feature.MakeBoolFlag(
"Unused Symbol Warnings",
"unusedSymbolWarnings",
"Markus Westerlind",
false,
)
// UnusedSymbolWarnings - Enables warnings for unused symbols
func UnusedSymbolWarnings() BoolFlag {
return unusedSymbolWarnings
}
// Inject will inject the Flagger into the context.
func Inject(ctx context.Context, flagger Flagger) context.Context {
return feature.Inject(ctx, flagger)
}
var all = []Flag{
aggregateTransformationTransport,
groupTransformationGroup,
queryConcurrencyLimit,
optimizeUnionTransformation,
vectorizedMap,
narrowTransformationDifference,
narrowTransformationFill,
optimizeAggregateWindow,
narrowTransformationLimit,
optimizeStateTracking,
vectorizeLogicalOperators,
labelPolymorphism,
optimizeSetTransformation,
unusedSymbolWarnings,
}
var byKey = map[string]Flag{
"aggregateTransformationTransport": aggregateTransformationTransport,
"groupTransformationGroup": groupTransformationGroup,
"queryConcurrencyLimit": queryConcurrencyLimit,
"optimizeUnionTransformation": optimizeUnionTransformation,
"vectorizedMap": vectorizedMap,
"narrowTransformationDifference": narrowTransformationDifference,
"narrowTransformationFill": narrowTransformationFill,
"optimizeAggregateWindow": optimizeAggregateWindow,
"narrowTransformationLimit": narrowTransformationLimit,
"optimizeStateTracking": optimizeStateTracking,
"vectorizeLogicalOperators": vectorizeLogicalOperators,
"labelPolymorphism": labelPolymorphism,
"optimizeSetTransformation": optimizeSetTransformation,
"unusedSymbolWarnings": unusedSymbolWarnings,
}
// Flags returns all feature flags.
func Flags() []Flag {
return all
}
// ByKey returns the Flag corresponding to the given key.
func ByKey(k string) (Flag, bool) {
v, found := byKey[k]
return v, found
}
type Metrics = feature.Metrics
// SetMetrics sets the metric store for feature flags.
func SetMetrics(m Metrics) {
feature.SetMetrics(m)
}