From ac64f53925462f89bae70db618458dba1317aef8 Mon Sep 17 00:00:00 2001 From: "Zhanxiang (Patrick) Huang" Date: Tue, 19 Mar 2024 22:40:59 +0800 Subject: [PATCH] fix: show sub_level_id for level 0 in rw_hummock_sstables (#15797) --- .../src/catalog/system_catalog/rw_catalog/rw_hummock_version.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/frontend/src/catalog/system_catalog/rw_catalog/rw_hummock_version.rs b/src/frontend/src/catalog/system_catalog/rw_catalog/rw_hummock_version.rs index 48e2dcfd5361..8332cc4d1d45 100644 --- a/src/frontend/src/catalog/system_catalog/rw_catalog/rw_hummock_version.rs +++ b/src/frontend/src/catalog/system_catalog/rw_catalog/rw_hummock_version.rs @@ -123,7 +123,7 @@ fn version_to_sstable_rows(version: HummockVersion) -> Vec { object_id: sst.object_id as _, compaction_group_id: cg.group_id as _, level_id: level.level_idx as _, - sub_level_id: (level.level_idx > 0).then_some(level.sub_level_id as _), + sub_level_id: (level.level_idx == 0).then_some(level.sub_level_id as _), level_type: level.level_type as _, key_range_left: key_range.left, key_range_right: key_range.right,