@@ -79,6 +79,8 @@ pub enum Feature {
7979 NgramIndex ,
8080 #[ serde( alias = "workload_group" , alias = "WORKLOAD_GROUP" ) ]
8181 WorkloadGroup ,
82+ #[ serde( alias = "system_history" , alias = "SYSTEM_HISTORY" ) ]
83+ SystemHistory ,
8284 #[ serde( other) ]
8385 Unknown ,
8486}
@@ -128,6 +130,7 @@ impl fmt::Display for Feature {
128130 Feature :: HilbertClustering => write ! ( f, "hilbert_clustering" ) ,
129131 Feature :: NgramIndex => write ! ( f, "ngram_index" ) ,
130132 Feature :: WorkloadGroup => write ! ( f, "workload_group" ) ,
133+ Feature :: SystemHistory => write ! ( f, "system_history" ) ,
131134 Feature :: Unknown => write ! ( f, "unknown" ) ,
132135 }
133136 }
@@ -350,6 +353,16 @@ mod tests {
350353 serde_json:: from_str:: <Feature >( "\" NgramIndex\" " ) . unwrap( )
351354 ) ;
352355
356+ assert_eq ! (
357+ Feature :: WorkloadGroup ,
358+ serde_json:: from_str:: <Feature >( "\" workload_group\" " ) . unwrap( )
359+ ) ;
360+
361+ assert_eq ! (
362+ Feature :: SystemHistory ,
363+ serde_json:: from_str:: <Feature >( "\" system_history\" " ) . unwrap( )
364+ ) ;
365+
353366 assert_eq ! (
354367 Feature :: Unknown ,
355368 serde_json:: from_str:: <Feature >( "\" ssss\" " ) . unwrap( )
@@ -384,11 +397,13 @@ mod tests {
384397 Feature :: AmendTable ,
385398 Feature :: HilbertClustering ,
386399 Feature :: NgramIndex ,
400+ Feature :: WorkloadGroup ,
401+ Feature :: SystemHistory ,
387402 ] ) ,
388403 } ;
389404
390405 assert_eq ! (
391- "LicenseInfo{ type: enterprise, org: databend, tenants: [databend_tenant,foo], features: [aggregate_index,amend_table,attach_table,compute_quota(threads_num: 1, memory_usage: 1),computed_column,data_mask,hilbert_clustering,inverted_index,license_info,ngram_index,storage_encryption,storage_quota(storage_usage: 1),stream,vacuum,virtual_column] }" ,
406+ "LicenseInfo{ type: enterprise, org: databend, tenants: [databend_tenant,foo], features: [aggregate_index,amend_table,attach_table,compute_quota(threads_num: 1, memory_usage: 1),computed_column,data_mask,hilbert_clustering,inverted_index,license_info,ngram_index,storage_encryption,storage_quota(storage_usage: 1),stream,system_history, vacuum,virtual_column,workload_group ] }" ,
392407 license_info. to_string( )
393408 ) ;
394409 }
0 commit comments