@@ -33,10 +33,6 @@ pub enum Feature {
3333 VirtualColumn ,
3434 #[ serde( alias = "data_mask" , alias = "DATA_MASK" ) ]
3535 DataMask ,
36- #[ serde( alias = "aggregate_index" , alias = "AGGREGATE_INDEX" ) ]
37- AggregateIndex ,
38- #[ serde( alias = "inverted_index" , alias = "INVERTED_INDEX" ) ]
39- InvertedIndex ,
4036 #[ serde( alias = "computed_column" , alias = "COMPUTED_COLUMN" ) ]
4137 ComputedColumn ,
4238 #[ serde( alias = "storage_encryption" , alias = "STORAGE_ENCRYPTION" ) ]
@@ -51,14 +47,10 @@ pub enum Feature {
5147 HilbertClustering ,
5248 #[ serde( alias = "system_management" , alias = "SYSTEM_MANAGEMENT" ) ]
5349 SystemManagement ,
54- #[ serde( alias = "ngram_index" , alias = "NGRAM_INDEX" ) ]
55- NgramIndex ,
5650 #[ serde( alias = "workload_group" , alias = "WORKLOAD_GROUP" ) ]
5751 WorkloadGroup ,
5852 #[ serde( alias = "system_history" , alias = "SYSTEM_HISTORY" ) ]
5953 SystemHistory ,
60- #[ serde( alias = "vector_index" , alias = "VECTOR_INDEX" ) ]
61- VectorIndex ,
6254 #[ serde( alias = "private_task" , alias = "PRIVATE_TASK" ) ]
6355 PrivateTask ,
6456 #[ serde( alias = "max_node_quota" , alias = "MAX_NODE_QUOTA" ) ]
@@ -85,19 +77,15 @@ impl fmt::Display for Feature {
8577 Feature :: Test => write ! ( f, "test" ) ,
8678 Feature :: VirtualColumn => write ! ( f, "virtual_column" ) ,
8779 Feature :: DataMask => write ! ( f, "data_mask" ) ,
88- Feature :: AggregateIndex => write ! ( f, "aggregate_index" ) ,
89- Feature :: InvertedIndex => write ! ( f, "inverted_index" ) ,
9080 Feature :: ComputedColumn => write ! ( f, "computed_column" ) ,
9181 Feature :: StorageEncryption => write ! ( f, "storage_encryption" ) ,
9282 Feature :: Stream => write ! ( f, "stream" ) ,
9383 Feature :: AttacheTable => write ! ( f, "attach_table" ) ,
9484 Feature :: AmendTable => write ! ( f, "amend_table" ) ,
9585 Feature :: SystemManagement => write ! ( f, "system_management" ) ,
9686 Feature :: HilbertClustering => write ! ( f, "hilbert_clustering" ) ,
97- Feature :: NgramIndex => write ! ( f, "ngram_index" ) ,
9887 Feature :: WorkloadGroup => write ! ( f, "workload_group" ) ,
9988 Feature :: SystemHistory => write ! ( f, "system_history" ) ,
100- Feature :: VectorIndex => write ! ( f, "vector_index" ) ,
10189 Feature :: PrivateTask => write ! ( f, "private_task" ) ,
10290 Feature :: RowAccessPolicy => write ! ( f, "row_access_policy" ) ,
10391 Feature :: Unknown => write ! ( f, "unknown" ) ,
@@ -126,20 +114,16 @@ impl Feature {
126114 false => Ok ( VerifyResult :: Failure ) ,
127115 } ,
128116 ( Feature :: Test , Feature :: Test )
129- | ( Feature :: AggregateIndex , Feature :: AggregateIndex )
130117 | ( Feature :: ComputedColumn , Feature :: ComputedColumn )
131118 | ( Feature :: Vacuum , Feature :: Vacuum )
132119 | ( Feature :: LicenseInfo , Feature :: LicenseInfo )
133120 | ( Feature :: Stream , Feature :: Stream )
134121 | ( Feature :: DataMask , Feature :: DataMask )
135122 | ( Feature :: RowAccessPolicy , Feature :: RowAccessPolicy )
136- | ( Feature :: InvertedIndex , Feature :: InvertedIndex )
137123 | ( Feature :: VirtualColumn , Feature :: VirtualColumn )
138124 | ( Feature :: AttacheTable , Feature :: AttacheTable )
139125 | ( Feature :: StorageEncryption , Feature :: StorageEncryption )
140- | ( Feature :: HilbertClustering , Feature :: HilbertClustering )
141- | ( Feature :: NgramIndex , Feature :: NgramIndex )
142- | ( Feature :: VectorIndex , Feature :: VectorIndex ) => Ok ( VerifyResult :: Success ) ,
126+ | ( Feature :: HilbertClustering , Feature :: HilbertClustering ) => Ok ( VerifyResult :: Success ) ,
143127 ( _, _) => Ok ( VerifyResult :: MissMatch ) ,
144128 }
145129 }
@@ -230,14 +214,6 @@ mod tests {
230214 Feature :: DataMask ,
231215 serde_json:: from_str:: <Feature >( "\" DataMask\" " ) . unwrap( )
232216 ) ;
233- assert_eq ! (
234- Feature :: AggregateIndex ,
235- serde_json:: from_str:: <Feature >( "\" AggregateIndex\" " ) . unwrap( )
236- ) ;
237- assert_eq ! (
238- Feature :: InvertedIndex ,
239- serde_json:: from_str:: <Feature >( "\" InvertedIndex\" " ) . unwrap( )
240- ) ;
241217 assert_eq ! (
242218 Feature :: ComputedColumn ,
243219 serde_json:: from_str:: <Feature >( "\" ComputedColumn\" " ) . unwrap( )
@@ -265,11 +241,6 @@ mod tests {
265241 serde_json:: from_str:: <Feature >( "\" hilbert_clustering\" " ) . unwrap( )
266242 ) ;
267243
268- assert_eq ! (
269- Feature :: NgramIndex ,
270- serde_json:: from_str:: <Feature >( "\" NgramIndex\" " ) . unwrap( )
271- ) ;
272-
273244 assert_eq ! (
274245 Feature :: WorkloadGroup ,
275246 serde_json:: from_str:: <Feature >( "\" workload_group\" " ) . unwrap( )
@@ -280,11 +251,6 @@ mod tests {
280251 serde_json:: from_str:: <Feature >( "\" system_history\" " ) . unwrap( )
281252 ) ;
282253
283- assert_eq ! (
284- Feature :: VectorIndex ,
285- serde_json:: from_str:: <Feature >( "\" VectorIndex\" " ) . unwrap( )
286- ) ;
287-
288254 assert_eq ! (
289255 Feature :: PrivateTask ,
290256 serde_json:: from_str:: <Feature >( "\" private_task\" " ) . unwrap( )
@@ -318,15 +284,12 @@ mod tests {
318284 Feature :: Test ,
319285 Feature :: VirtualColumn ,
320286 Feature :: DataMask ,
321- Feature :: AggregateIndex ,
322- Feature :: InvertedIndex ,
323287 Feature :: ComputedColumn ,
324288 Feature :: StorageEncryption ,
325289 Feature :: Stream ,
326290 Feature :: AttacheTable ,
327291 Feature :: AmendTable ,
328292 Feature :: HilbertClustering ,
329- Feature :: NgramIndex ,
330293 Feature :: WorkloadGroup ,
331294 Feature :: SystemHistory ,
332295 Feature :: PrivateTask ,
@@ -335,7 +298,7 @@ mod tests {
335298 } ;
336299
337300 assert_eq ! (
338- "LicenseInfo{ type: enterprise, org: databend, tenants: [databend_tenant,foo], features: [aggregate_index, amend_table,attach_table,computed_column,data_mask,hilbert_clustering,inverted_index, license_info,ngram_index ,private_task,row_access_policy,storage_encryption,stream,system_history,vacuum,virtual_column,workload_group] }" ,
301+ "LicenseInfo{ type: enterprise, org: databend, tenants: [databend_tenant,foo], features: [amend_table,attach_table,computed_column,data_mask,hilbert_clustering,license_info,private_task,row_access_policy,storage_encryption,stream,system_history,vacuum,virtual_column,workload_group] }" ,
339302 license_info. to_string( )
340303 ) ;
341304 }
0 commit comments