From 8a144d728a746a23bba900466aaefdd70beb31b2 Mon Sep 17 00:00:00 2001 From: Bugen Zhao Date: Tue, 3 Sep 2024 15:47:36 +0800 Subject: [PATCH] try try Signed-off-by: Bugen Zhao --- src/common/src/hash/table_distribution.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/src/hash/table_distribution.rs b/src/common/src/hash/table_distribution.rs index 10ceacb9f3fa3..d597403a1b003 100644 --- a/src/common/src/hash/table_distribution.rs +++ b/src/common/src/hash/table_distribution.rs @@ -75,7 +75,7 @@ impl TableDistribution { ) -> Self { let compute_vnode = if let Some(vnode_col_idx_in_pk) = vnode_col_idx_in_pk { ComputeVnode::VnodeColumnIndex { - vnodes: vnodes.expect("vnodes must be `Some` as vnode column is set"), + vnodes: vnodes.unwrap_or_else(|| Bitmap::singleton().into()), vnode_col_idx_in_pk, } } else if !dist_key_in_pk_indices.is_empty() { @@ -139,7 +139,7 @@ impl TableDistribution { match &self.compute_vnode { ComputeVnode::DistKeyIndices { vnodes, .. } => vnodes, ComputeVnode::VnodeColumnIndex { vnodes, .. } => vnodes, - ComputeVnode::Singleton => &*SINGLETON_VNODES, + ComputeVnode::Singleton => &SINGLETON_VNODES, } }