diff --git a/src/query/src/qTsbuf.c b/src/query/src/qTsbuf.c index acbf094555e72cb72fd096014be8e8a89d700f4c..bb124dec06e49be23f3a1572d8a878a694811977 100644 --- a/src/query/src/qTsbuf.c +++ b/src/query/src/qTsbuf.c @@ -492,10 +492,10 @@ void tsBufAppend(STSBuf* pTSBuf, int32_t id, tVariant* tag, const char* pData, i } void tsBufFlush(STSBuf* pTSBuf) { - if (pTSBuf->tsData.len <= 0) { + if (pTSBuf->numOfGroups <= 0) { return; } - + writeDataToDisk(pTSBuf); shrinkBuffer(&pTSBuf->tsData);