Use init_columnar_read_state instead of lower level func

Funtionally, this doesn't change anything. This is just a preparation
before next commit.
pull/5165/head
Onur Tirtir 2021-08-05 18:48:26 +03:00
parent a8435620c4
commit 7fcecde203
1 changed files with 6 additions and 4 deletions

View File

@ -795,10 +795,12 @@ columnar_relation_copy_for_cluster(Relation OldHeap, Relation NewHeap,
/* we need all columns */
int natts = OldHeap->rd_att->natts;
Bitmapset *attr_needed = bms_add_range(NULL, 0, natts - 1);
List *projectedColumnList = NeededColumnsList(sourceDesc, attr_needed);
ColumnarReadState *readState = ColumnarBeginRead(OldHeap, sourceDesc,
projectedColumnList,
NULL);
/* no quals for table rewrite */
List *scanQual = NIL;
ColumnarReadState *readState = init_columnar_read_state(OldHeap, sourceDesc,
attr_needed, scanQual);
Datum *values = palloc0(sourceDesc->natts * sizeof(Datum));
bool *nulls = palloc0(sourceDesc->natts * sizeof(bool));