From fa9739d0d87a01a77a753eeb4795c5bb63846e63 Mon Sep 17 00:00:00 2001 From: ThearchyHelios Date: Thu, 15 Oct 2026 19:48:11 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A1=8C=E6=95=B0=E7=9A=84=E6=9D=A5=E6=BA=90?= =?UTF-8?q?=E5=88=86=E6=B8=85=E3=80=8C=E9=80=90=E8=A1=8C=E6=95=B0=E5=87=BA?= =?UTF-8?q?=E6=9D=A5=E7=9A=84=E5=87=86=E6=95=B0=E3=80=8D=E5=92=8C=E3=80=8C?= =?UTF-8?q?=E6=95=B0=E5=88=B0=E6=95=B4=E8=A1=A8=E7=BB=9F=E8=AE=A1=E8=A1=8C?= =?UTF-8?q?=E6=95=B0=E4=B8=8A=E9=99=90=E4=B8=BA=E6=AD=A2=E3=80=8D=EF=BC=9A?= =?UTF-8?q?=E4=BB=A5=E5=89=8D=E6=B2=A1=E8=B6=85=E8=BF=87=E4=B8=8A=E9=99=90?= =?UTF-8?q?=E3=80=81=E5=B7=B2=E7=BB=8F=E6=95=B0=E5=85=A8=E7=9A=84=E8=A1=A8?= =?UTF-8?q?=E4=B9=9F=E5=86=99=E3=80=8C=E6=95=B0=E5=88=B0=E4=B8=8A=E9=99=90?= =?UTF-8?q?=E4=B8=BA=E6=AD=A2=E3=80=8D=EF=BC=8C=E8=AF=BB=E7=9D=80=E5=83=8F?= =?UTF-8?q?=E8=A2=AB=E6=88=AA=E6=96=AD=E4=BA=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/lib/terms.ts | 5 +++-- frontend/src/pages/catalog/profile.ts | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/frontend/src/lib/terms.ts b/frontend/src/lib/terms.ts index da104668..6e4a5e4d 100644 --- a/frontend/src/lib/terms.ts +++ b/frontend/src/lib/terms.ts @@ -2988,8 +2988,9 @@ export const PROFILE_TEXT = { rowsCount: (n: number) => `${formatNumber(n)} 行`, rowsAtLeast: (n: number) => `超过 ${formatNumber(n - 1)} 行`, rowsUnknown: '没能得到行数', - rowsHint: { stats: '数据库统计信息中的估算值', count: '计数到整表统计行数上限为止' } as Record, - rowsSource: { stats: '来自数据库统计信息', count: '数到整表统计行数上限为止' } as Record, + // count 是逐行数完了(没超过整表统计行数上限,是准数);capped 是数到上限还没数完,只知道至少多少行 + rowsHint: { stats: '数据库统计信息中的估算值', count: '逐行数出来的准数,没超过整表统计行数上限', capped: '计数到整表统计行数上限为止' } as Record, + rowsSource: { stats: '来自数据库统计信息', count: '逐行数出来的', capped: '数到整表统计行数上限为止' } as Record, openTable: '打开', openTableLabel: (name: string) => `打开「${name}」`, findingRelations: '关联关系', diff --git a/frontend/src/pages/catalog/profile.ts b/frontend/src/pages/catalog/profile.ts index 2168fb5d..a6d41fb2 100644 --- a/frontend/src/pages/catalog/profile.ts +++ b/frontend/src/pages/catalog/profile.ts @@ -219,7 +219,7 @@ export function agoText(v: string | null | undefined, now = Date.now()): string return days <= 30 ? `${days} 天前` : formatTime(d) } -/** 行数估算写成人话,带来源(统计信息 / 数到上限);没有估算为 null */ +/** 行数估算写成人话,带来源(统计信息 / 逐行数出来的 / 数到上限);没有估算为 null */ export function sizeText(size: CatalogProfileSize | null | undefined): { text: string; hint?: string; source?: string } | null { if (!size) return null if (size.rows != null) { @@ -227,7 +227,7 @@ export function sizeText(size: CatalogProfileSize | null | undefined): { text: s hint: PROFILE_TEXT.rowsHint[size.method], source: PROFILE_TEXT.rowsSource[size.method] } } if (size.at_least != null) { - return { text: PROFILE_TEXT.rowsAtLeast(size.at_least), hint: PROFILE_TEXT.rowsHint.count, source: PROFILE_TEXT.rowsSource.count } + return { text: PROFILE_TEXT.rowsAtLeast(size.at_least), hint: PROFILE_TEXT.rowsHint.capped, source: PROFILE_TEXT.rowsSource.capped } } return { text: PROFILE_TEXT.rowsUnknown } }