mirror of https://github.com/citusdata/citus.git
format
parent
782b5cdd29
commit
01f6c48944
|
@ -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)
|
||||||
|
@ -2117,10 +2108,10 @@ columnar_bitmap_next_tuple(TableScanDesc scan, TBMIterateResult *tbmres,
|
||||||
/* no quals for index scan */
|
/* no quals for index scan */
|
||||||
List *scanQual = NIL;
|
List *scanQual = NIL;
|
||||||
|
|
||||||
cscan->cs_readState = init_columnar_read_state(rel, slot->tts_tupleDescriptor,
|
cscan->cs_readState = init_columnar_read_state(rel, slot->tts_tupleDescriptor,
|
||||||
attr_needed, scanQual,
|
attr_needed, scanQual,
|
||||||
cscan->scanContext,
|
cscan->scanContext,
|
||||||
cscan->cs_base.rs_snapshot);
|
cscan->cs_base.rs_snapshot);
|
||||||
}
|
}
|
||||||
|
|
||||||
uint64 rowNumber = tid_to_row_number(tid);
|
uint64 rowNumber = tid_to_row_number(tid);
|
||||||
|
@ -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,
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue