@@ -75,6 +75,8 @@ pub enum Feature {
7575 AmendTable ,
7676 #[ serde( alias = "system_management" , alias = "SYSTEM_MANAGEMENT" ) ]
7777 SystemManagement ,
78+ #[ serde( alias = "hilbert_clustering" , alias = "HILBERT_CLUSTERING" ) ]
79+ HilbertClustering ,
7880 #[ serde( other) ]
7981 Unknown ,
8082}
@@ -122,6 +124,7 @@ impl fmt::Display for Feature {
122124 }
123125 Feature :: AmendTable => write ! ( f, "amend_table" ) ,
124126 Feature :: SystemManagement => write ! ( f, "system_management" ) ,
127+ Feature :: HilbertClustering => write ! ( f, "hilbert_clustering" ) ,
125128 Feature :: Unknown => write ! ( f, "unknown" ) ,
126129 }
127130 }
@@ -169,7 +172,8 @@ impl Feature {
169172 | ( Feature :: InvertedIndex , Feature :: InvertedIndex )
170173 | ( Feature :: VirtualColumn , Feature :: VirtualColumn )
171174 | ( Feature :: AttacheTable , Feature :: AttacheTable )
172- | ( Feature :: StorageEncryption , Feature :: StorageEncryption ) => Ok ( true ) ,
175+ | ( Feature :: StorageEncryption , Feature :: StorageEncryption )
176+ | ( Feature :: HilbertClustering , Feature :: HilbertClustering ) => Ok ( true ) ,
173177 ( _, _) => Ok ( false ) ,
174178 }
175179 }
@@ -337,6 +341,11 @@ mod tests {
337341 serde_json:: from_str:: <Feature >( "\" amend_table\" " ) . unwrap( )
338342 ) ;
339343
344+ assert_eq ! (
345+ Feature :: HilbertClustering ,
346+ serde_json:: from_str:: <Feature >( "\" hilbert_clustering\" " ) . unwrap( )
347+ ) ;
348+
340349 assert_eq ! (
341350 Feature :: Unknown ,
342351 serde_json:: from_str:: <Feature >( "\" ssss\" " ) . unwrap( )
@@ -370,11 +379,12 @@ mod tests {
370379 storage_usage: Some ( 1 ) ,
371380 } ) ,
372381 Feature :: AmendTable ,
382+ Feature :: HilbertClustering ,
373383 ] ) ,
374384 } ;
375385
376386 assert_eq ! (
377- "LicenseInfo{ type: enterprise, org: databend, tenants: [databend_tenant,foo], features: [aggregate_index,amend_table,attach_table,background_service,compute_quota(threads_num: 1, memory_usage: 1),computed_column,data_mask,inverted_index,license_info,storage_encryption,storage_quota(storage_usage: 1),stream,vacuum,virtual_column] }" ,
387+ "LicenseInfo{ type: enterprise, org: databend, tenants: [databend_tenant,foo], features: [aggregate_index,amend_table,attach_table,background_service,compute_quota(threads_num: 1, memory_usage: 1),computed_column,data_mask,hilbert_clustering, inverted_index,license_info,storage_encryption,storage_quota(storage_usage: 1),stream,vacuum,virtual_column] }" ,
378388 license_info. to_string( )
379389 ) ;
380390 }
0 commit comments