Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
2dot5
ClickHouse
提交
c5cb05f5
C
ClickHouse
项目概览
2dot5
/
ClickHouse
通知
3
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
C
ClickHouse
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
c5cb05f5
编写于
10月 07, 2020
作者:
N
Nikolai Kochetov
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Try fix tests.
上级
7caf6da3
变更
9
显示空白变更内容
内联
并排
Showing
9 changed file
with
23 addition
and
10 deletion
+23
-10
src/Processors/QueryPlan/QueryPlan.cpp
src/Processors/QueryPlan/QueryPlan.cpp
+11
-0
src/Processors/QueryPlan/QueryPlan.h
src/Processors/QueryPlan/QueryPlan.h
+5
-0
src/Storages/MergeTree/StorageFromMergeTreeDataPart.h
src/Storages/MergeTree/StorageFromMergeTreeDataPart.h
+1
-4
src/Storages/StorageBuffer.cpp
src/Storages/StorageBuffer.cpp
+1
-1
src/Storages/StorageDistributed.cpp
src/Storages/StorageDistributed.cpp
+1
-1
src/Storages/StorageMaterializedView.cpp
src/Storages/StorageMaterializedView.cpp
+1
-1
src/Storages/StorageMergeTree.cpp
src/Storages/StorageMergeTree.cpp
+1
-1
src/Storages/StorageReplicatedMergeTree.cpp
src/Storages/StorageReplicatedMergeTree.cpp
+1
-1
src/Storages/StorageView.cpp
src/Storages/StorageView.cpp
+1
-1
未找到文件。
src/Processors/QueryPlan/QueryPlan.cpp
浏览文件 @
c5cb05f5
...
...
@@ -185,6 +185,17 @@ QueryPipelinePtr QueryPlan::buildQueryPipeline()
return
last_pipeline
;
}
Pipe
QueryPlan
::
convertToPipe
()
{
if
(
!
isInitialized
())
return
{};
if
(
isCompleted
())
throw
Exception
(
"Cannot convert completed QueryPlan to Pipe"
,
ErrorCodes
::
LOGICAL_ERROR
);
return
QueryPipeline
::
getPipe
(
std
::
move
(
*
buildQueryPipeline
()));
}
void
QueryPlan
::
addInterpreterContext
(
std
::
shared_ptr
<
Context
>
context
)
{
interpreter_context
.
emplace_back
(
std
::
move
(
context
));
...
...
src/Processors/QueryPlan/QueryPlan.h
浏览文件 @
c5cb05f5
...
...
@@ -20,6 +20,8 @@ class WriteBuffer;
class
QueryPlan
;
using
QueryPlanPtr
=
std
::
unique_ptr
<
QueryPlan
>
;
class
Pipe
;
/// A tree of query steps.
/// The goal of QueryPlan is to build QueryPipeline.
/// QueryPlan let delay pipeline creation which is helpful for pipeline-level optimisations.
...
...
@@ -42,6 +44,9 @@ public:
QueryPipelinePtr
buildQueryPipeline
();
/// If initialized, build pipeline and convert to pipe. Otherwise, return empty pipe.
Pipe
convertToPipe
();
struct
ExplainPlanOptions
{
/// Add output header to step.
...
...
src/Storages/MergeTree/StorageFromMergeTreeDataPart.h
浏览文件 @
c5cb05f5
...
...
@@ -33,10 +33,7 @@ public:
std
::
move
(
*
MergeTreeDataSelectExecutor
(
part
->
storage
)
.
readFromParts
({
part
},
column_names
,
metadata_snapshot
,
query_info
,
context
,
max_block_size
,
num_streams
));
if
(
!
query_plan
.
isInitialized
())
return
{};
return
QueryPipeline
::
getPipe
(
std
::
move
(
*
query_plan
.
buildQueryPipeline
()));
return
query_plan
.
convertToPipe
();
}
...
...
src/Storages/StorageBuffer.cpp
浏览文件 @
c5cb05f5
...
...
@@ -160,7 +160,7 @@ Pipe StorageBuffer::read(
{
QueryPlan
plan
;
read
(
plan
,
column_names
,
metadata_snapshot
,
query_info
,
context
,
processed_stage
,
max_block_size
,
num_streams
);
return
QueryPipeline
::
getPipe
(
std
::
move
(
*
plan
.
buildQueryPipeline
())
);
return
plan
.
convertToPipe
(
);
}
void
StorageBuffer
::
read
(
...
...
src/Storages/StorageDistributed.cpp
浏览文件 @
c5cb05f5
...
...
@@ -505,7 +505,7 @@ Pipe StorageDistributed::read(
{
QueryPlan
plan
;
read
(
plan
,
column_names
,
metadata_snapshot
,
query_info
,
context
,
processed_stage
,
max_block_size
,
num_streams
);
return
QueryPipeline
::
getPipe
(
std
::
move
(
*
plan
.
buildQueryPipeline
())
);
return
plan
.
convertToPipe
(
);
}
void
StorageDistributed
::
read
(
...
...
src/Storages/StorageMaterializedView.cpp
浏览文件 @
c5cb05f5
...
...
@@ -117,7 +117,7 @@ Pipe StorageMaterializedView::read(
{
QueryPlan
plan
;
read
(
plan
,
column_names
,
metadata_snapshot
,
query_info
,
context
,
processed_stage
,
max_block_size
,
num_streams
);
return
QueryPipeline
::
getPipe
(
std
::
move
(
*
plan
.
buildQueryPipeline
())
);
return
plan
.
convertToPipe
(
);
}
void
StorageMaterializedView
::
read
(
...
...
src/Storages/StorageMergeTree.cpp
浏览文件 @
c5cb05f5
...
...
@@ -195,7 +195,7 @@ Pipe StorageMergeTree::read(
{
QueryPlan
plan
;
read
(
plan
,
column_names
,
metadata_snapshot
,
query_info
,
context
,
processed_stage
,
max_block_size
,
num_streams
);
return
QueryPipeline
::
getPipe
(
std
::
move
(
*
plan
.
buildQueryPipeline
())
);
return
plan
.
convertToPipe
(
);
}
std
::
optional
<
UInt64
>
StorageMergeTree
::
totalRows
()
const
...
...
src/Storages/StorageReplicatedMergeTree.cpp
浏览文件 @
c5cb05f5
...
...
@@ -3551,7 +3551,7 @@ Pipe StorageReplicatedMergeTree::read(
{
QueryPlan
plan
;
read
(
plan
,
column_names
,
metadata_snapshot
,
query_info
,
context
,
processed_stage
,
max_block_size
,
num_streams
);
return
QueryPipeline
::
getPipe
(
std
::
move
(
*
plan
.
buildQueryPipeline
())
);
return
plan
.
convertToPipe
(
);
}
...
...
src/Storages/StorageView.cpp
浏览文件 @
c5cb05f5
...
...
@@ -61,7 +61,7 @@ Pipe StorageView::read(
{
QueryPlan
plan
;
read
(
plan
,
column_names
,
metadata_snapshot
,
query_info
,
context
,
processed_stage
,
max_block_size
,
num_streams
);
return
QueryPipeline
::
getPipe
(
std
::
move
(
*
plan
.
buildQueryPipeline
())
);
return
plan
.
convertToPipe
(
);
}
void
StorageView
::
read
(
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录