Skip to content

Commit

Permalink
check if data_scanned is defined
Browse files Browse the repository at this point in the history
otherwise we could get "Data Scanned ?" if it's not supported
by some data sources
  • Loading branch information
zachliu committed Sep 18, 2024
1 parent 7f4a309 commit 8967fbb
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import QueryControlDropdown from "@/components/EditVisualizationButton/QueryCont
import EditVisualizationButton from "@/components/EditVisualizationButton";
import useQueryResultData from "@/lib/useQueryResultData";
import { durationHumanize, pluralize, prettySize } from "@/lib/utils";
import { isUndefined } from "lodash";

import "./QueryExecutionMetadata.less";

Expand Down Expand Up @@ -68,7 +69,7 @@ export default function QueryExecutionMetadata({
)}
{isQueryExecuting && <span>Running&hellip;</span>}
</span>
{!isQueryExecuting && (
{!isUndefined(queryResultData.metadata.data_scanned) && !isQueryExecuting && (
<span className="m-l-5">
Data Scanned <strong>{prettySize(queryResultData.metadata.data_scanned)}</strong>
</span>
Expand Down

0 comments on commit 8967fbb

Please sign in to comment.