Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit0e21179

Browse files
author
Arthur Zakirov
committed
Some comments
1 parent7135b63 commit0e21179

File tree

3 files changed

+17
-10
lines changed

3 files changed

+17
-10
lines changed

‎src/rum.h

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -682,21 +682,25 @@ typedef enum
682682

683683
typedefstructRumScanOpaqueData
684684
{
685+
/* tempCtx is used to hold consistent and ordering functions data */
685686
MemoryContexttempCtx;
686-
MemoryContextkeyCtx;/* used to hold key and entry data */
687+
/* keyCtx is used to hold key and entry data */
688+
MemoryContextkeyCtx;
687689
RumStaterumstate;
688690

689-
RumScanKey*keys;/* one per scan qualifier expr */
691+
RumScanKey*keys;/* one per scan qualifier expr */
690692
uint32nkeys;
691-
intnorderbys;
692693

693-
RumScanEntry*entries;/* one per index search condition */
694-
RumScanEntry*sortedEntries;/*one per index search condition */
695-
intentriesIncrIndex;
694+
RumScanEntry*entries;/* one per index search condition */
695+
RumScanEntry*sortedEntries;/*Sorted entries. Used in fast scan */
696+
intentriesIncrIndex;/* used in fast scan */
696697
uint32totalentries;
697-
uint32allocentries;/* allocated length of entries[] */
698+
uint32allocentries;/* allocated length of entries[] and
699+
sortedEntries[] */
698700

699701
Tuplesortstate*sortstate;
702+
intnorderbys;/* Number of columns in ordering.
703+
Will be assigned to sortstate->nKeys */
700704

701705
RumKeykey;
702706
boolfirstCall;

‎src/rumget.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2033,6 +2033,7 @@ rumgetbitmap(IndexScanDesc scan, TIDBitmap *tbm)
20332033
RumScanOpaqueso= (RumScanOpaque)scan->opaque;
20342034
int64ntids=0;
20352035
boolrecheck;
2036+
RumKeykey;
20362037

20372038
/*
20382039
* Set up the scan keys, and check for unsatisfiable query.
@@ -2063,14 +2064,16 @@ rumgetbitmap(IndexScanDesc scan, TIDBitmap *tbm)
20632064
*/
20642065
startScan(scan);
20652066

2067+
ItemPointerSetInvalid(&key.iptr);
2068+
20662069
for (;;)
20672070
{
20682071
CHECK_FOR_INTERRUPTS();
20692072

2070-
if (!scanGetItem(scan,&so->key,&so->key,&recheck))
2073+
if (!scanGetItem(scan,&key,&key,&recheck))
20712074
break;
20722075

2073-
tbm_add_tuples(tbm,&so->key.iptr,1,recheck);
2076+
tbm_add_tuples(tbm,&key.iptr,1,recheck);
20742077
ntids++;
20752078
}
20762079

‎src/rumscan.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -547,7 +547,7 @@ rumNewScanKey(IndexScanDesc scan)
547547
oldCtx=MemoryContextSwitchTo(so->keyCtx);
548548

549549
/* if no scan keys provided, allocate extra EVERYTHING RumScanKey */
550-
so->keys= (RumScanKey*)
550+
so->keys= (RumScanKey*)
551551
palloc((Max(scan->numberOfKeys,1)+scan->numberOfOrderBys)*
552552
sizeof(*so->keys));
553553
so->nkeys=0;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp