Skip to content

Commit

Permalink
fix issue #7810 (#7854) (#7870)
Browse files Browse the repository at this point in the history
close #7810
  • Loading branch information
ti-chi-bot authored Dec 4, 2023
1 parent c8d1b80 commit d48dc34
Showing 1 changed file with 14 additions and 11 deletions.
25 changes: 14 additions & 11 deletions dbms/src/Interpreters/executeQuery.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -240,19 +240,22 @@ std::tuple<ASTPtr, BlockIO> executeQueryImpl(
{
if (auto * stream = dynamic_cast<IProfilingBlockInputStream *>(res.in.get()))
{
stream->setProgressCallback(context.getProgressCallback());
stream->setProcessListElement(context.getProcessListElement());

/// Limits on the result, the quota on the result, and also callback for progress.
/// Limits apply only to the final result.
if (stage == QueryProcessingStage::Complete)
if (auto * dag_src = dynamic_cast<DAGQuerySource *>(&query_src); dag_src == nullptr)
{
IProfilingBlockInputStream::LocalLimits limits;
limits.mode = IProfilingBlockInputStream::LIMITS_CURRENT;
limits.size_limits = SizeLimits(settings.max_result_rows, settings.max_result_bytes, settings.result_overflow_mode);
stream->setProgressCallback(context.getProgressCallback());
stream->setProcessListElement(context.getProcessListElement());

stream->setLimits(limits);
stream->setQuota(quota);
/// Limits on the result, the quota on the result, and also callback for progress.
/// Limits apply only to the final result.
if (stage == QueryProcessingStage::Complete)
{
IProfilingBlockInputStream::LocalLimits limits;
limits.mode = IProfilingBlockInputStream::LIMITS_CURRENT;
limits.size_limits = SizeLimits(settings.max_result_rows, settings.max_result_bytes, settings.result_overflow_mode);

stream->setLimits(limits);
stream->setQuota(quota);
}
}
}
}
Expand Down

0 comments on commit d48dc34

Please sign in to comment.