10000 Renamed tupdesc to sortdesc [skip ci] · postgrespro/pgvector@edc2126 · GitHub
[go: up one dir, main page]

Skip to content

Commit edc2126

Browse files
committed
Renamed tupdesc to sortdesc [skip ci]
1 parent 2cbd08b commit edc2126

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

src/ivfbuild.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ InsertTuples(Relation index, IvfflatBuildState * buildstate, ForkNumber forkNum)
254254
IndexTuple itup = NULL; /* silence compiler warning */
255255
int64 inserted = 0;
256256

257-
TupleTableSlot *slot = MakeSingleTupleTableSlot(buildstate->tupdesc, &TTSOpsMinimalTuple);
257+
TupleTableSlot *slot = MakeSingleTupleTableSlot(buildstate->sortdesc, &TTSOpsMinimalTuple);
258258
TupleDesc tupdesc = RelationGetDescr(index);
259259

260260
pgstat_progress_update_param(PROGRESS_CREATEIDX_SUBPHASE, PROGRESS_IVFFLAT_PHASE_LOAD);
@@ -356,12 +356,12 @@ InitBuildState(IvfflatBuildState * buildstate, Relation heap, Relation index, In
356356
errmsg("dimensions must be greater than one for this opclass")));
357357

358358
/* Create tuple description for sorting */
359-
buildstate->tupdesc = CreateTemplateTupleDesc(3);
360-
TupleDescInitEntry(buildstate->tupdesc, (AttrNumber) 1, "list", INT4OID, -1, 0);
361-
TupleDescInitEntry(buildstate->tupdesc, (AttrNumber) 2, "tid", TIDOID, -1, 0);
362-
TupleDescInitEntry(buildstate->tupdesc, (AttrNumber) 3, "vector", RelationGetDescr(index)->attrs[0].atttypid, -1, 0);
359+
buildstate->sortdesc = CreateTemplateTupleDesc(3);
360+
TupleDescInitEntry(buildstate->sortdesc, (AttrNumber) 1, "list", INT4OID, -1, 0);
361+
TupleDescInitEntry(buildstate->sortdesc, (AttrNumber) 2, "tid", TIDOID, -1, 0);
362+
TupleDescInitEntry(buildstate->sortdesc, (AttrNumber) 3, "vector", RelationGetDescr(index)->attrs[0].atttypid, -1, 0);
363363

364-
buildstate->slot = MakeSingleTupleTableSlot(buildstate->tupdesc, &TTSOpsVirtual);
364+
buildstate->slot = MakeSingleTupleTableSlot(buildstate->sortdesc, &TTSOpsVirtual);
365365

366366
buildstate->centers = VectorArrayInit(buildstate->lists, buildstate->dimensions, buildstate->typeInfo->itemSize(buildstate->dimensions));
367367
buildstate->listInfo = palloc(sizeof(ListInfo) * buildstate->lists);
@@ -633,7 +633,7 @@ IvfflatParallelScanAndSort(IvfflatSpool * ivfspool, IvfflatShared * ivfshared, S
633633
InitBuildState(&buildstate, ivfspool->heap, ivfspool->index, indexInfo);
634634
memcpy(buildstate.centers->items, ivfcenters, buildstate.centers->itemsize * buildstate.centers->maxlen);
635635
buildstate.centers->length = buildstate.centers->maxlen;
636-
ivfspool->sortstate = InitBuildSortState(buildstate.tupdesc, sortmem, coordinate);
636+
ivfspool->sortstate = InitBuildSortState(buildstate.sortdesc, sortmem, coordinate);
637637
buildstate.sortstate = ivfspool->sortstate;
638638
scan = table_beginscan_parallel(ivfspool->heap,
639639
ParallelTableScanFromIvfflatShared(ivfshared));
@@ -950,7 +950,7 @@ AssignTuples(IvfflatBuildState * buildstate)
950950
}
951951

952952
/* Begin serial/leader tuplesort */
953-
buildstate->sortstate = InitBuildSortState(buildstate->tupdesc, maintenance_work_mem, coordinate);
953+
buildstate->sortstate = InitBuildSortState(buildstate->sortdesc, maintenance_work_mem, coordinate);
954954

955955
/* Add tuples to sort */
956956
if (buildstate->heap != NULL)

src/ivfflat.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ typedef struct IvfflatBuildState
198198

199199
/* Sorting */
200200
Tuplesortstate *sortstate;
201-
TupleDesc tupdesc;
201+
TupleDesc sortdesc;
202202
TupleTableSlot *slot;
203203

204204
/* Memory */

0 commit comments

Comments
 (0)
0