Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Gpdb
提交
1b26fbfc
G
Gpdb
项目概览
Greenplum
/
Gpdb
通知
7
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
Gpdb
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
1b26fbfc
编写于
6月 17, 2016
作者:
N
Nikos Armenatzoglou
提交者:
Karthikeyan Jambu Rajaraman
6月 28, 2016
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Enrolled targetlist for scan and aggregate
Signed-off-by:
N
Karthikeyan Jambu Rajaraman
<
karthi.jrk@gmail.com
>
上级
ebd1d014
变更
4
显示空白变更内容
内联
并排
Showing
4 changed file
with
93 addition
and
18 deletion
+93
-18
src/backend/codegen/codegen_wrapper.cc
src/backend/codegen/codegen_wrapper.cc
+2
-0
src/backend/codegen/op_expr_tree_generator.cc
src/backend/codegen/op_expr_tree_generator.cc
+6
-6
src/backend/executor/execProcnode.c
src/backend/executor/execProcnode.c
+84
-12
src/include/codegen/codegen_wrapper.h
src/include/codegen/codegen_wrapper.h
+1
-0
未找到文件。
src/backend/codegen/codegen_wrapper.cc
浏览文件 @
1b26fbfc
...
...
@@ -129,3 +129,5 @@ void* ExecEvalExprCodegenEnroll(
return
generator
;
}
src/backend/codegen/op_expr_tree_generator.cc
浏览文件 @
1b26fbfc
...
...
@@ -46,11 +46,11 @@ void OpExprTreeGenerator::InitializeSupportedFunction() {
supported_function_
[
177
]
=
std
::
unique_ptr
<
PGFuncGeneratorInterface
>
(
new
PGGenericFuncGenerator
<
int32_t
,
int32_t
>
(
141
,
"int4pl"
,
&
PGArithFuncGenerator
<
int32_t
,
int32_t
,
int32_t
>::
AddWithOverflow
));
177
,
"int4pl"
,
&
PGArithFuncGenerator
<
int32_t
,
int32_t
,
int32_t
>::
AddWithOverflow
));
supported_function_
[
181
]
=
std
::
unique_ptr
<
PGFuncGeneratorInterface
>
(
new
PGGenericFuncGenerator
<
int32_t
,
int32_t
>
(
14
1
,
"int4mi"
,
&
PGArithFuncGenerator
<
int32_t
,
int32_t
,
int32_t
>::
SubWithOverflow
));
18
1
,
"int4mi"
,
&
PGArithFuncGenerator
<
int32_t
,
int32_t
,
int32_t
>::
SubWithOverflow
));
supported_function_
[
141
]
=
std
::
unique_ptr
<
PGFuncGeneratorInterface
>
(
new
PGGenericFuncGenerator
<
int32_t
,
int32_t
>
(
...
...
src/backend/executor/execProcnode.c
浏览文件 @
1b26fbfc
...
...
@@ -162,6 +162,12 @@ static void ExecCdbTraceNode(PlanState *node, bool entry, TupleTableSlot *result
void
*
context
,
int
flags
);
void
EnrollQualList
(
PlanState
*
result
);
void
EnrollProjInfoTargetList
(
ProjectionInfo
*
ProjInfo
);
/*
* setSubplanSliceId
* Set the slice id info for the given subplan.
...
...
@@ -336,20 +342,17 @@ ExecInitNode(Plan *node, EState *estate, int eflags)
{
result
=
(
PlanState
*
)
ExecInitTableScan
((
TableScan
*
)
node
,
estate
,
eflags
);
}
END_MEMORY_ACCOUNT
();
#ifdef USE_CODEGEN
/* Enroll quals' expression evaluation functions in codegen_manager */
if
(
result
&&
NULL
!=
result
->
qual
)
{
ListCell
*
l
;
foreach
(
l
,
result
->
qual
)
/*
* Enroll targetlist & quals' expression evaluation functions
* in codegen_manager
*/
EnrollQualList
(
result
);
if
(
NULL
!=
result
)
{
ExprState
*
exprstate
=
(
ExprState
*
)
lfirst
(
l
);
enroll_ExecEvalExpr_codegen
(
exprstate
->
evalfunc
,
&
exprstate
->
evalfunc
,
exprstate
,
result
->
ps_ExprContext
);
EnrollProjInfoTargetList
(
result
->
ps_ProjInfo
);
}
}
#endif
END_MEMORY_ACCOUNT
();
break
;
case
T_DynamicTableScan
:
...
...
@@ -573,6 +576,20 @@ ExecInitNode(Plan *node, EState *estate, int eflags)
{
result
=
(
PlanState
*
)
ExecInitAgg
((
Agg
*
)
node
,
estate
,
eflags
);
/*
* Enroll targetlist & quals' expression evaluation functions
* in codegen_manager
*/
EnrollQualList
(
result
);
if
(
NULL
!=
result
)
{
AggState
*
aggstate
=
(
AggState
*
)
result
;
for
(
int
aggno
=
0
;
aggno
<
aggstate
->
numaggs
;
aggno
++
)
{
AggStatePerAgg
peraggstate
=
&
aggstate
->
peragg
[
aggno
];
EnrollProjInfoTargetList
(
peraggstate
->
evalproj
);
}
}
}
END_MEMORY_ACCOUNT
();
break
;
...
...
@@ -752,6 +769,61 @@ ExecInitNode(Plan *node, EState *estate, int eflags)
return
result
;
}
/* ----------------------------------------------------------------
* EnrollTargetAndQualList
*
* Enroll Target and Qual List from PlanState to Codegen
* ----------------------------------------------------------------
*/
void
EnrollQualList
(
PlanState
*
result
)
{
#ifdef USE_CODEGEN
if
(
NULL
==
result
||
NULL
==
result
->
qual
)
{
return
;
}
ListCell
*
l
;
foreach
(
l
,
result
->
qual
)
{
ExprState
*
exprstate
=
(
ExprState
*
)
lfirst
(
l
);
enroll_ExecEvalExpr_codegen
(
exprstate
->
evalfunc
,
&
exprstate
->
evalfunc
,
exprstate
,
result
->
ps_ExprContext
);
}
#endif
}
void
EnrollProjInfoTargetList
(
ProjectionInfo
*
ProjInfo
)
{
#ifdef USE_CODEGEN
if
(
NULL
==
ProjInfo
||
NULL
==
ProjInfo
->
pi_targetlist
)
{
return
;
}
ListCell
*
l
;
foreach
(
l
,
ProjInfo
->
pi_targetlist
)
{
GenericExprState
*
gstate
=
(
GenericExprState
*
)
lfirst
(
l
);
if
(
NULL
==
gstate
->
arg
||
NULL
==
gstate
->
arg
->
evalfunc
)
{
continue
;
}
enroll_ExecEvalExpr_codegen
(
gstate
->
arg
->
evalfunc
,
&
gstate
->
arg
->
evalfunc
,
gstate
->
arg
,
ProjInfo
->
pi_exprContext
);
}
#endif
}
/* ----------------------------------------------------------------
* ExecSliceDependencyNode
*
...
...
src/include/codegen/codegen_wrapper.h
浏览文件 @
1b26fbfc
...
...
@@ -151,6 +151,7 @@ ExecEvalExprCodegenEnroll(ExecEvalExprFn regular_func_ptr,
struct
ExprState
*
exprstate
,
struct
ExprContext
*
econtext
);
#ifdef __cplusplus
}
// extern "C"
#endif
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录