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