Skip to content

Commit

Permalink
This is an automated cherry-pick of pingcap#7854
Browse files Browse the repository at this point in the history
Signed-off-by: ti-chi-bot <[email protected]>
  • Loading branch information
SeaRise authored and ti-chi-bot committed Aug 1, 2023
1 parent bae3aef commit 187ca1b
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 0 deletions.
3 changes: 3 additions & 0 deletions dbms/src/Flash/executeQuery.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,10 @@ BlockIO executeDAG(IQuerySource & dag, Context & context, bool internal)
/// Hold element of process list till end of query execution.
res.process_list_entry = process_list_entry;

<<<<<<< HEAD
prepareForInputStream(context, QueryProcessingStage::Complete, res.in);
=======
>>>>>>> 80f8e9dc65 (fix issue #7810 (#7854))
if (likely(!internal))
logQueryPipeline(logger, res.in);

Expand Down
15 changes: 15 additions & 0 deletions dbms/src/Interpreters/executeQuery.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,18 @@ void onExceptionBeforeStart(const String & query, Context & context, time_t curr
}
}

void prepareForInputStream(
Context & context,
const BlockInputStreamPtr & in)
{
assert(in);
if (auto * stream = dynamic_cast<IProfilingBlockInputStream *>(in.get()))
{
stream->setProgressCallback(context.getProgressCallback());
stream->setProcessListElement(context.getProcessListElement());
}
}

std::tuple<ASTPtr, BlockIO> executeQueryImpl(
IQuerySource & query_src,
Context & context,
Expand Down Expand Up @@ -386,6 +398,7 @@ void logQuery(const String & query, const Context & context, const LoggerPtr & l
joinLines(query));
}

<<<<<<< HEAD
void prepareForInputStream(
Context & context,
QueryProcessingStage::Enum stage,
Expand All @@ -412,6 +425,8 @@ void prepareForInputStream(
}
}

=======
>>>>>>> 80f8e9dc65 (fix issue #7810 (#7854))
std::shared_ptr<ProcessListEntry> setProcessListElement(
Context & context,
const String & query,
Expand Down
3 changes: 3 additions & 0 deletions dbms/src/Interpreters/executeQuery.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,12 @@ void logQueryPipeline(const LoggerPtr & logger, const BlockInputStreamPtr & in);

void logQuery(const String & query, const Context & context, const LoggerPtr & logger);

<<<<<<< HEAD
void prepareForInputStream(
Context & context,
QueryProcessingStage::Enum stage,
const BlockInputStreamPtr & in);

=======
>>>>>>> 80f8e9dc65 (fix issue #7810 (#7854))
} // namespace DB

0 comments on commit 187ca1b

Please sign in to comment.