From b16a2495612aa12abbf122dc71c7b368958310cf Mon Sep 17 00:00:00 2001 From: Noel Kwan Date: Thu, 19 Sep 2024 21:56:26 +0800 Subject: [PATCH] typecheck --- dashboard/components/RelationDependencyGraph.tsx | 2 +- dashboard/pages/dependency_graph.tsx | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dashboard/components/RelationDependencyGraph.tsx b/dashboard/components/RelationDependencyGraph.tsx index 03579bec4f060..3ee3f7bf61b68 100644 --- a/dashboard/components/RelationDependencyGraph.tsx +++ b/dashboard/components/RelationDependencyGraph.tsx @@ -66,7 +66,7 @@ export default function RelationDependencyGraph({ nodes: RelationPoint[] selectedId: string | undefined setSelectedId: (id: string) => void - backPressures: Map // relationId-relationId->back_pressure_rate}) + backPressures?: Map // relationId-relationId->back_pressure_rate}) }) { const [modalData, setModalId] = useCatalogModal(nodes.map((n) => n.relation)) diff --git a/dashboard/pages/dependency_graph.tsx b/dashboard/pages/dependency_graph.tsx index ba75d8beb2281..9217a4d05e2ef 100644 --- a/dashboard/pages/dependency_graph.tsx +++ b/dashboard/pages/dependency_graph.tsx @@ -178,14 +178,14 @@ export default function StreamingGraph() { }, [backPressureDataSource, toast, resetEmbeddedBackPressures]) // Get relationId-relationId -> backpressure rate map - const backPressures = useMemo(() => { + const backPressures: Map | undefined = useMemo(() => { if (!fragmentVertexToRelationMap) { - return new Map() + return new Map() } let inMap = fragmentVertexToRelationMap.inMap let outMap = fragmentVertexToRelationMap.outMap if (prometheusMetrics || embeddedBackPressureInfo) { - let map = new Map() + let map = new Map() if (backPressureDataSource === "Embedded" && embeddedBackPressureInfo) { const metrics = calculateBPRate(