Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Gpdb
提交
cfc71031
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,发现更多精彩内容 >>
提交
cfc71031
编写于
6月 28, 2006
作者:
T
Tom Lane
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Adjust TupleHashTables to use MinimalTuple format for contained tuples.
上级
15897332
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
22 addition
and
24 deletion
+22
-24
src/backend/executor/execGrouping.c
src/backend/executor/execGrouping.c
+14
-14
src/backend/executor/nodeAgg.c
src/backend/executor/nodeAgg.c
+4
-5
src/backend/executor/nodeSubplan.c
src/backend/executor/nodeSubplan.c
+2
-3
src/include/nodes/execnodes.h
src/include/nodes/execnodes.h
+2
-2
未找到文件。
src/backend/executor/execGrouping.c
浏览文件 @
cfc71031
...
...
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/executor/execGrouping.c,v 1.1
8 2006/03/05 15:58:25 momjian
Exp $
* $PostgreSQL: pgsql/src/backend/executor/execGrouping.c,v 1.1
9 2006/06/28 17:05:49 tgl
Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -389,7 +389,7 @@ LookupTupleHashEntry(TupleHashTable hashtable, TupleTableSlot *slot,
/* Copy the first tuple into the table context */
MemoryContextSwitchTo
(
hashtable
->
tablecxt
);
entry
->
firstTuple
=
ExecCopySlotTuple
(
slot
);
entry
->
firstTuple
=
ExecCopySlot
Minimal
Tuple
(
slot
);
*
isnew
=
true
;
}
...
...
@@ -405,23 +405,23 @@ LookupTupleHashEntry(TupleHashTable hashtable, TupleTableSlot *slot,
/*
* Compute the hash value for a tuple
*
* The passed-in key is a pointer to TupleHashEntryData. In an actual
*
hash table entry, the firstTuple field therein points to a physical
*
tuple. LookupTupleHashEntry sets up a dummy TupleHashEntryData with
*
a
NULL firstTuple field --- that cues us to look at the inputslot instead.
* This convention avoids the need to materialize virtual input tuples
*
unless
they actually need to get copied into the table.
* The passed-in key is a pointer to TupleHashEntryData. In an actual
hash
*
table entry, the firstTuple field points to a tuple (in MinimalTuple
*
format). LookupTupleHashEntry sets up a dummy TupleHashEntryData with a
* NULL firstTuple field --- that cues us to look at the inputslot instead.
* This convention avoids the need to materialize virtual input tuples
unless
* they actually need to get copied into the table.
*
* CurTupleHashTable must be set before calling this, since dynahash.c
* doesn't provide any API that would let us get at the hashtable otherwise.
*
* Also, the caller must select an appropriate memory context for running
* the hash functions.
(dynahash.c doesn't change CurrentMemoryContext.)
* the hash functions.
(dynahash.c doesn't change CurrentMemoryContext.)
*/
static
uint32
TupleHashTableHash
(
const
void
*
key
,
Size
keysize
)
{
HeapTuple
tuple
=
((
const
TupleHashEntryData
*
)
key
)
->
firstTuple
;
MinimalTuple
tuple
=
((
const
TupleHashEntryData
*
)
key
)
->
firstTuple
;
TupleTableSlot
*
slot
;
TupleHashTable
hashtable
=
CurTupleHashTable
;
int
numCols
=
hashtable
->
numCols
;
...
...
@@ -439,7 +439,7 @@ TupleHashTableHash(const void *key, Size keysize)
/* Process a tuple already stored in the table */
/* (this case never actually occurs in current dynahash.c code) */
slot
=
hashtable
->
tableslot
;
ExecStore
Tuple
(
tuple
,
slot
,
InvalidBuffer
,
false
);
ExecStore
MinimalTuple
(
tuple
,
slot
,
false
);
}
for
(
i
=
0
;
i
<
numCols
;
i
++
)
...
...
@@ -480,10 +480,10 @@ TupleHashTableHash(const void *key, Size keysize)
static
int
TupleHashTableMatch
(
const
void
*
key1
,
const
void
*
key2
,
Size
keysize
)
{
HeapTuple
tuple1
=
((
const
TupleHashEntryData
*
)
key1
)
->
firstTuple
;
MinimalTuple
tuple1
=
((
const
TupleHashEntryData
*
)
key1
)
->
firstTuple
;
#ifdef USE_ASSERT_CHECKING
HeapTuple
tuple2
=
((
const
TupleHashEntryData
*
)
key2
)
->
firstTuple
;
MinimalTuple
tuple2
=
((
const
TupleHashEntryData
*
)
key2
)
->
firstTuple
;
#endif
TupleTableSlot
*
slot1
;
TupleTableSlot
*
slot2
;
...
...
@@ -497,7 +497,7 @@ TupleHashTableMatch(const void *key1, const void *key2, Size keysize)
*/
Assert
(
tuple1
!=
NULL
);
slot1
=
hashtable
->
tableslot
;
ExecStore
Tuple
(
tuple1
,
slot1
,
InvalidBuffer
,
false
);
ExecStore
MinimalTuple
(
tuple1
,
slot1
,
false
);
Assert
(
tuple2
==
NULL
);
slot2
=
hashtable
->
inputslot
;
...
...
src/backend/executor/nodeAgg.c
浏览文件 @
cfc71031
...
...
@@ -61,7 +61,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/executor/nodeAgg.c,v 1.14
0 2006/06/21 18:39:42
tgl Exp $
* $PostgreSQL: pgsql/src/backend/executor/nodeAgg.c,v 1.14
1 2006/06/28 17:05:49
tgl Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -957,10 +957,9 @@ agg_retrieve_hash_table(AggState *aggstate)
* Store the copied first input tuple in the tuple table slot reserved
* for it, so that it can be used in ExecProject.
*/
ExecStoreTuple
(
entry
->
shared
.
firstTuple
,
firstSlot
,
InvalidBuffer
,
false
);
ExecStoreMinimalTuple
(
entry
->
shared
.
firstTuple
,
firstSlot
,
false
);
pergroup
=
entry
->
pergroup
;
...
...
src/backend/executor/nodeSubplan.c
浏览文件 @
cfc71031
...
...
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/executor/nodeSubplan.c,v 1.7
5 2006/06/16 18:42:22
tgl Exp $
* $PostgreSQL: pgsql/src/backend/executor/nodeSubplan.c,v 1.7
6 2006/06/28 17:05:49
tgl Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -572,8 +572,7 @@ findPartialMatch(TupleHashTable hashtable, TupleTableSlot *slot)
ResetTupleHashIterator
(
hashtable
,
&
hashiter
);
while
((
entry
=
ScanTupleHashTable
(
&
hashiter
))
!=
NULL
)
{
ExecStoreTuple
(
entry
->
firstTuple
,
hashtable
->
tableslot
,
InvalidBuffer
,
false
);
ExecStoreMinimalTuple
(
entry
->
firstTuple
,
hashtable
->
tableslot
,
false
);
if
(
!
execTuplesUnequal
(
hashtable
->
tableslot
,
slot
,
numCols
,
keyColIdx
,
hashtable
->
eqfunctions
,
...
...
src/include/nodes/execnodes.h
浏览文件 @
cfc71031
...
...
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2006, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* $PostgreSQL: pgsql/src/include/nodes/execnodes.h,v 1.15
0 2006/04/30 18:30:40
tgl Exp $
* $PostgreSQL: pgsql/src/include/nodes/execnodes.h,v 1.15
1 2006/06/28 17:05:49
tgl Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -367,7 +367,7 @@ typedef struct TupleHashTableData *TupleHashTable;
typedef
struct
TupleHashEntryData
{
/* firstTuple must be the first field in this struct! */
HeapTuple
firstTuple
;
/* copy of first tuple in this group */
MinimalTuple
firstTuple
;
/* copy of first tuple in this group */
/* there may be additional data beyond the end of this struct */
}
TupleHashEntryData
;
/* VARIABLE LENGTH STRUCT */
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录