ClickHouse

Форк
0
/
ReadFromPreparedSource.cpp 
38 строк · 1.0 Кб
1
#include <Processors/Formats/IInputFormat.h>
2
#include <Processors/QueryPlan/ReadFromPreparedSource.h>
3
#include <Processors/SourceWithKeyCondition.h>
4
#include <QueryPipeline/QueryPipelineBuilder.h>
5

6
namespace DB
7
{
8

9
ReadFromPreparedSource::ReadFromPreparedSource(Pipe pipe_)
10
    : ISourceStep(DataStream{.header = pipe_.getHeader()})
11
    , pipe(std::move(pipe_))
12
{
13
}
14

15
void ReadFromPreparedSource::initializePipeline(QueryPipelineBuilder & pipeline, const BuildQueryPipelineSettings &)
16
{
17
    for (const auto & processor : pipe.getProcessors())
18
        processors.emplace_back(processor);
19

20
    pipeline.init(std::move(pipe));
21
}
22

23
ReadFromStorageStep::ReadFromStorageStep(
24
    Pipe pipe_,
25
    String storage_name,
26
    ContextPtr context_,
27
    const SelectQueryInfo & query_info_)
28
    : ReadFromPreparedSource(std::move(pipe_))
29
    , context(std::move(context_))
30
    , query_info(query_info_)
31
{
32
    setStepDescription(storage_name);
33

34
    for (const auto & processor : pipe.getProcessors())
35
        processor->setStorageLimits(query_info.storage_limits);
36
}
37

38
}
39

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.