MCPcopy Create free account
hub / github.com/ClickHouse/ClickHouse / onLogData

Method onLogData

src/Client/ClientBase.cpp:634–656  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

632
633
634void ClientBase::onLogData(Block & block)
635{
636 initLogsOutputStream();
637 if (need_render_progress && tty_buf)
638 {
639 std::unique_lock lock(tty_mutex);
640 progress_indication.clearProgressOutput(*tty_buf, lock);
641 }
642 if (need_render_progress_table && tty_buf)
643 {
644 std::unique_lock lock(tty_mutex);
645 progress_table.clearTableOutput(*tty_buf, lock);
646 }
647 /// Logs can be unsorted, i.e. if they were combined from multiple servers (in case of distributed queries)
648 {
649 SortDescription desc;
650 desc.push_back(SortColumnDescription("event_time"));
651 desc.push_back(SortColumnDescription("event_time_microseconds"));
652 sortBlock(block, desc, 0, IColumn::PermutationSortStability::Stable);
653 }
654 logs_out_stream->writeLogs(block);
655 logs_out_stream->flush();
656}
657
658
659void ClientBase::onTotals(Block & block, ASTPtr parsed_query)

Callers

nothing calls this directly

Calls 7

sortBlockFunction · 0.85
clearProgressOutputMethod · 0.80
clearTableOutputMethod · 0.80
writeLogsMethod · 0.80
push_backMethod · 0.45
flushMethod · 0.45

Tested by

no test coverage detected