Skip to content

Commit

Permalink
Create cached_StringInfo in CreateEmptyChunkData for PG 16
Browse files Browse the repository at this point in the history
  • Loading branch information
ashenBlade committed Dec 20, 2024
1 parent dd3e9e3 commit ac53d56
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions columnar/src/backend/columnar/columnar_reader.c
Original file line number Diff line number Diff line change
Expand Up @@ -1140,7 +1140,12 @@ CreateEmptyChunkData(uint32 columnCount, bool *columnMask, uint32 chunkGroupRowC
ChunkData *chunkData = palloc0(sizeof(ChunkData));
chunkData->existsArray = palloc0(columnCount * sizeof(bool *));
chunkData->valueArray = palloc0(columnCount * sizeof(Datum *));
#if PG_VERSION_NUM >= PG_VERSION_16
/* 'cache' member will be 'false' because of 'palloc0' */
chunkData->valueBufferArray = palloc0(columnCount * sizeof(cached_StringInfo));
#else
chunkData->valueBufferArray = palloc0(columnCount * sizeof(StringInfo));
#endif
chunkData->columnCount = columnCount;
chunkData->rowCount = chunkGroupRowCount;

Expand Down

0 comments on commit ac53d56

Please sign in to comment.