From e3f53a80608fd258e0fecd3d9e4a4cda53fe693e Mon Sep 17 00:00:00 2001 From: Ruihang Xia Date: Thu, 21 Sep 2023 15:46:05 +0800 Subject: [PATCH] fix: add slash after generated region_dir (#2463) * fix: add slash after generated region_dir Signed-off-by: Ruihang Xia * update ut Signed-off-by: Ruihang Xia --------- Signed-off-by: Ruihang Xia --- src/store-api/src/path_utils.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/store-api/src/path_utils.rs b/src/store-api/src/path_utils.rs index 59dd640024a4..82d55c588d0e 100644 --- a/src/store-api/src/path_utils.rs +++ b/src/store-api/src/path_utils.rs @@ -45,7 +45,7 @@ pub fn table_dir(path: &str, table_id: TableId) -> String { pub fn region_dir(path: &str, region_id: RegionId) -> String { format!( - "{}{}", + "{}{}/", table_dir(path, region_id.table_id()), region_name(region_id.table_id(), region_id.region_number()) ) @@ -60,7 +60,7 @@ mod tests { let region_id = RegionId::new(42, 1); assert_eq!( region_dir("my_catalog/my_schema", region_id), - "data/my_catalog/my_schema/42/42_0000000001" + "data/my_catalog/my_schema/42/42_0000000001/" ); } }