diff --git a/src/common/src/tdataformat.c b/src/common/src/tdataformat.c index d593d1b7483fa3645d0778c590fe8c1fd6734e17..ae79256f216ab0d914c87f513d52f1e946d3be71 100644 --- a/src/common/src/tdataformat.c +++ b/src/common/src/tdataformat.c @@ -510,7 +510,9 @@ static void tdAppendKvRowToDataCol(SKVRow row, STSchema *pSchema, SDataCols *pCo while (dcol < pCols->numOfCols) { SDataCol *pDataCol = &(pCols->cols[dcol]); if (rcol >= nRowCols || rcol >= schemaNCols(pSchema)) { - dataColAppendVal(pDataCol, getNullValue(pDataCol->type), pCols->numOfRows, pCols->maxPoints, rowOffset); + if (forceSetNull) { + dataColAppendVal(pDataCol, getNullValue(pDataCol->type), pCols->numOfRows, pCols->maxPoints, rowOffset); + } ++dcol; continue; } @@ -523,7 +525,7 @@ static void tdAppendKvRowToDataCol(SKVRow row, STSchema *pSchema, SDataCols *pCo dataColAppendVal(pDataCol, value, pCols->numOfRows, pCols->maxPoints, rowOffset); } else if (rowOffset == -1) { // for update 2 - if (value && !isNull(value, pDataCol->type)) { + if (!isNull(value, pDataCol->type)) { dataColAppendVal(pDataCol, value, pCols->numOfRows, pCols->maxPoints, rowOffset); } } else {