pull/5273/head
Nils Dijk 2021-09-10 12:10:41 +02:00
parent 782b5cdd29
commit 01f6c48944
No known key found for this signature in database
GPG Key ID: CA1177EF9434F241
1 changed files with 6 additions and 14 deletions

View File

@ -2074,7 +2074,6 @@ columnar_bitmap_next_block(TableScanDesc scan, TBMIterateResult *tbmres)
ColumnarScanDesc cscan = (ColumnarScanDesc) scan; ColumnarScanDesc cscan = (ColumnarScanDesc) scan;
cscan->tupleindex = 0; cscan->tupleindex = 0;
// ereport(ERROR, (errmsg("bitmap scan not implemented")));
return tbmres->blockno == 0; return tbmres->blockno == 0;
} }
@ -2085,27 +2084,19 @@ columnar_bitmap_next_tuple(TableScanDesc scan, TBMIterateResult *tbmres,
{ {
ColumnarScanDesc cscan = (ColumnarScanDesc) scan; ColumnarScanDesc cscan = (ColumnarScanDesc) scan;
/**/
if (cscan->tupleindex >= tbmres->ntuples) if (cscan->tupleindex >= tbmres->ntuples)
{ {
return false; return false;
} }
// TEST! ItemPointerData tid = { 0 };
ItemPointerData tid = {};
ItemPointerSet(&tid, tbmres->blockno, tbmres->offsets[cscan->tupleindex]); ItemPointerSet(&tid, tbmres->blockno, tbmres->offsets[cscan->tupleindex]);
cscan->tupleindex++; cscan->tupleindex++;
ExecClearTuple(slot); ExecClearTuple(slot);
/* we need all columns */
Relation rel = cscan->cs_base.rs_rd; Relation rel = cscan->cs_base.rs_rd;
// int natts = rel->rd_att->natts;
// Bitmapset *attr_needed = bms_add_range(NULL, 0, natts - 1);
// TupleDesc relationTupleDesc = RelationGetDescr(rel);
// List *relationColumnList = NeededColumnsList(relationTupleDesc, attr_needed);
/* initialize read state for the first row */ /* initialize read state for the first row */
if (cscan->cs_readState == NULL) if (cscan->cs_readState == NULL)
@ -2137,6 +2128,7 @@ columnar_bitmap_next_tuple(TableScanDesc scan, TBMIterateResult *tbmres,
return true; return true;
} }
static const TableAmRoutine columnar_am_methods = { static const TableAmRoutine columnar_am_methods = {
.type = T_TableAmRoutine, .type = T_TableAmRoutine,