Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Gpdb
提交
613e9fbb
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,体验更适合开发者的 AI 搜索 >>
提交
613e9fbb
编写于
10月 10, 2016
作者:
K
Karthikeyan Jambu Rajaraman
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Revert "Fix codegen issue by moving slot_getattr to heaptuple.c similar to"
This reverts commit
c940c7f6
.
上级
ae90706b
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
35 addition
and
39 deletion
+35
-39
src/backend/access/common/heaptuple.c
src/backend/access/common/heaptuple.c
+0
-35
src/backend/codegen/include/codegen/slot_getattr_codegen.h
src/backend/codegen/include/codegen/slot_getattr_codegen.h
+1
-2
src/include/executor/tuptable.h
src/include/executor/tuptable.h
+34
-2
未找到文件。
src/backend/access/common/heaptuple.c
浏览文件 @
613e9fbb
...
...
@@ -1442,41 +1442,6 @@ slot_deform_tuple(TupleTableSlot *slot, int natts)
slot
->
PRIVATE_tts_slow
=
slow
;
}
/*
* Get an attribute from the tuple table slot.
*/
Datum
slot_getattr
(
TupleTableSlot
*
slot
,
int
attnum
,
bool
*
isnull
)
{
Assert
(
!
TupIsNull
(
slot
));
Assert
(
attnum
<=
slot
->
tts_tupleDescriptor
->
natts
);
/* System attribute */
if
(
attnum
<=
0
)
return
slot_getsysattr
(
slot
,
attnum
,
isnull
);
/* fast path for virtual tuple */
if
(
TupHasVirtualTuple
(
slot
)
&&
slot
->
PRIVATE_tts_nvalid
>=
attnum
)
{
*
isnull
=
slot
->
PRIVATE_tts_isnull
[
attnum
-
1
];
return
slot
->
PRIVATE_tts_values
[
attnum
-
1
];
}
/* Mem tuple: We do not even populate virtual tuple */
if
(
TupHasMemTuple
(
slot
))
{
Assert
(
slot
->
tts_mt_bind
);
return
memtuple_getattr
(
slot
->
PRIVATE_tts_memtuple
,
slot
->
tts_mt_bind
,
attnum
,
isnull
);
}
/* Slow: heap tuple */
Assert
(
TupHasHeapTuple
(
slot
));
_slot_getsomeattrs
(
slot
,
attnum
);
Assert
(
TupHasVirtualTuple
(
slot
)
&&
slot
->
PRIVATE_tts_nvalid
>=
attnum
);
*
isnull
=
slot
->
PRIVATE_tts_isnull
[
attnum
-
1
];
return
slot
->
PRIVATE_tts_values
[
attnum
-
1
];
}
/*
* slot_getsomeattrs
* This function forces the entries of the slot's Datum/isnull
...
...
src/backend/codegen/include/codegen/slot_getattr_codegen.h
浏览文件 @
613e9fbb
...
...
@@ -104,8 +104,7 @@ class SlotGetAttrCodegen : public BaseCodegen<SlotGetAttrFn> {
SlotGetAttrCodegen
(
gpcodegen
::
CodegenManager
*
manager
,
TupleTableSlot
*
slot
,
int
max_attr
)
:
BaseCodegen
(
manager
,
kSlotGetAttrPrefix
,
slot_getattr
,
&
dummy_func_
),
:
BaseCodegen
(
manager
,
kSlotGetAttrPrefix
,
slot_getattr
,
&
dummy_func_
),
slot_
(
slot
),
max_attr_
(
max_attr
),
llvm_function_
(
nullptr
)
{
...
...
src/include/executor/tuptable.h
浏览文件 @
613e9fbb
...
...
@@ -316,8 +316,40 @@ static inline ItemPointer slot_get_ctid(TupleTableSlot *slot)
return
&
(
slot
->
PRIVATE_tts_synthetic_ctid
);
}
/* in access/common/heaptuple.c */
extern
Datum
slot_getattr
(
TupleTableSlot
*
slot
,
int
attnum
,
bool
*
isnull
);
/*
* Get an attribute from the tuple table slot.
*/
static
inline
Datum
slot_getattr
(
TupleTableSlot
*
slot
,
int
attnum
,
bool
*
isnull
)
{
Assert
(
!
TupIsNull
(
slot
));
Assert
(
attnum
<=
slot
->
tts_tupleDescriptor
->
natts
);
/* System attribute */
if
(
attnum
<=
0
)
return
slot_getsysattr
(
slot
,
attnum
,
isnull
);
/* fast path for virtual tuple */
if
(
TupHasVirtualTuple
(
slot
)
&&
slot
->
PRIVATE_tts_nvalid
>=
attnum
)
{
*
isnull
=
slot
->
PRIVATE_tts_isnull
[
attnum
-
1
];
return
slot
->
PRIVATE_tts_values
[
attnum
-
1
];
}
/* Mem tuple: We do not even populate virtual tuple */
if
(
TupHasMemTuple
(
slot
))
{
Assert
(
slot
->
tts_mt_bind
);
return
memtuple_getattr
(
slot
->
PRIVATE_tts_memtuple
,
slot
->
tts_mt_bind
,
attnum
,
isnull
);
}
/* Slow: heap tuple */
Assert
(
TupHasHeapTuple
(
slot
));
_slot_getsomeattrs
(
slot
,
attnum
);
Assert
(
TupHasVirtualTuple
(
slot
)
&&
slot
->
PRIVATE_tts_nvalid
>=
attnum
);
*
isnull
=
slot
->
PRIVATE_tts_isnull
[
attnum
-
1
];
return
slot
->
PRIVATE_tts_values
[
attnum
-
1
];
}
static
inline
bool
slot_attisnull
(
TupleTableSlot
*
slot
,
int
attnum
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录