mirror of https://github.com/apache/druid.git
parent
8f102f9031
commit
b1988b2f93
|
@ -23,7 +23,12 @@ import type { JSX } from 'react';
|
|||
import React, { useState } from 'react';
|
||||
|
||||
import type { Execution } from '../../../druid-models';
|
||||
import { downloadQueryResults, formatDurationHybrid, pluralIfNeeded } from '../../../utils';
|
||||
import {
|
||||
downloadQueryResults,
|
||||
formatDurationHybrid,
|
||||
formatInteger,
|
||||
pluralIfNeeded,
|
||||
} from '../../../utils';
|
||||
import { DestinationPagesDialog } from '../destination-pages-dialog/destination-pages-dialog';
|
||||
|
||||
import './execution-summary-panel.scss';
|
||||
|
@ -45,11 +50,17 @@ export const ExecutionSummaryPanel = React.memo(function ExecutionSummaryPanel(
|
|||
|
||||
if (queryResult) {
|
||||
const wrapQueryLimit = queryResult.getSqlOuterLimit();
|
||||
const hasMoreResults = queryResult.getNumResults() === wrapQueryLimit;
|
||||
let resultCount: string;
|
||||
const numTotalRows = execution?.destination?.numTotalRows;
|
||||
if (typeof wrapQueryLimit === 'undefined' && typeof numTotalRows === 'number') {
|
||||
resultCount = pluralIfNeeded(numTotalRows, 'result');
|
||||
} else {
|
||||
const hasMoreResults = queryResult.getNumResults() === wrapQueryLimit;
|
||||
|
||||
const resultCount = hasMoreResults
|
||||
? `${queryResult.getNumResults() - 1}+ results`
|
||||
: pluralIfNeeded(queryResult.getNumResults(), 'result');
|
||||
resultCount = hasMoreResults
|
||||
? `${formatInteger(queryResult.getNumResults() - 1)}+ results`
|
||||
: pluralIfNeeded(queryResult.getNumResults(), 'result');
|
||||
}
|
||||
|
||||
const warningCount = execution?.stages?.getWarningCount();
|
||||
|
||||
|
|
|
@ -347,7 +347,7 @@ export const RunPanel = React.memo(function RunPanel(props: RunPanelProps) {
|
|||
))}
|
||||
<MenuDivider />
|
||||
<MenuCheckbox
|
||||
checked={selectDestination === 'taskReport' ? !query.unlimited : undefined}
|
||||
checked={selectDestination === 'taskReport' ? !query.unlimited : false}
|
||||
intent={intent}
|
||||
disabled={selectDestination !== 'taskReport'}
|
||||
text="Limit SELECT results in taskReport"
|
||||
|
|
Loading…
Reference in New Issue