diff --git a/src/client/src/tscUtil.c b/src/client/src/tscUtil.c index 13e1582526147b23928af8ead07711b873bc1a53..b6fe38e5c2366c89f121a3024c4718b1d881911f 100644 --- a/src/client/src/tscUtil.c +++ b/src/client/src/tscUtil.c @@ -655,7 +655,7 @@ static void trimDataBlock(void* pDataBlock, STableDataBlocks* pTableDataBlock) { int toffset = 0; for (int32_t j = 0; j < tinfo.numOfColumns; j++) { - tdAppendColVal(trow, p, pSchema[j].type, pSchema[j].bytes, toffset); + tdAppendColVal(trow, isNull(p, pSchema[j].type) ? NULL : p, pSchema[j].type, pSchema[j].bytes, toffset); toffset += TYPE_BYTES[pSchema[j].type]; p += pSchema[j].bytes; }