diff --git a/src/meta/proto-conv/src/table_from_to_protobuf_impl.rs b/src/meta/proto-conv/src/table_from_to_protobuf_impl.rs index 25e8ba4db714e..6d0cb4de36b87 100644 --- a/src/meta/proto-conv/src/table_from_to_protobuf_impl.rs +++ b/src/meta/proto-conv/src/table_from_to_protobuf_impl.rs @@ -194,6 +194,8 @@ impl FromToProto for mt::TableMeta { let default_cluster_key_id = if let Some(cluster_key_id) = p.default_cluster_key_id { cluster_key_id + } else if p.cluster_keys.is_empty() { + 0 } else { p.cluster_keys.len() as u32 - 1 };