[TD-4034]check if STColumn is NULL,then ignore cache NULL column

This commit is contained in:
lichuang 2021-05-17 14:29:36 +08:00
parent 9d3d129fef
commit 3b2d5f74ed
1 changed files with 4 additions and 0 deletions

View File

@ -993,6 +993,10 @@ static void updateTableLatestColumn(STsdbRepo *pRepo, STable *pTable, SDataRow r
}
STColumn *pTCol = schemaColAt(pSchema, j);
if (pTCol == NULL) {
// since schema maybe changed, check if STColumn NULL then ignore
continue;
}
SDataCol *pDataCol = &(pLatestCols[j]);
void* value = tdGetRowDataOfCol(row, (int8_t)pTCol->type, TD_DATA_ROW_HEAD_SIZE + pSchema->columns[j].offset);
if (isNullN(value, pTCol->type)) {