@@ -262,8 +262,11 @@ pub struct TableMeta {
262262 pub options : BTreeMap < String , String > ,
263263 // The default cluster key.
264264 pub default_cluster_key : Option < String > ,
265- // The sequence number of default_cluster_key.
266- pub default_cluster_key_id : u32 ,
265+ /// A sequential number that uniquely identifies changes to the cluster key.
266+ /// This value increments by 1 each time the cluster key is created or modified,
267+ /// ensuring a unique identifier for each version of the cluster key.
268+ /// It remains unchanged when the cluster key is dropped.
269+ pub cluster_key_seq : u32 ,
267270 pub created_on : DateTime < Utc > ,
268271 pub updated_on : DateTime < Utc > ,
269272 pub comment : String ,
@@ -410,7 +413,7 @@ impl TableInfo {
410413 self . meta
411414 . default_cluster_key
412415 . clone ( )
413- . map ( |k| ( self . meta . default_cluster_key_id , k) )
416+ . map ( |k| ( self . meta . cluster_key_seq , k) )
414417 }
415418}
416419
@@ -424,7 +427,7 @@ impl Default for TableMeta {
424427 part_prefix : "" . to_string ( ) ,
425428 options : BTreeMap :: new ( ) ,
426429 default_cluster_key : None ,
427- default_cluster_key_id : 0 ,
430+ cluster_key_seq : 0 ,
428431 created_on : Utc :: now ( ) ,
429432 updated_on : Utc :: now ( ) ,
430433 comment : "" . to_string ( ) ,
0 commit comments