From 28b73b415cb38ba37f6d04fc5548d9fd56675022 Mon Sep 17 00:00:00 2001 From: Bob Liu Date: Wed, 29 Nov 2023 02:44:55 +0800 Subject: [PATCH] fit insert childtable by file --- source/libs/parser/src/parInsertSql.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/libs/parser/src/parInsertSql.c b/source/libs/parser/src/parInsertSql.c index 684314faef..d58eeed7ef 100644 --- a/source/libs/parser/src/parInsertSql.c +++ b/source/libs/parser/src/parInsertSql.c @@ -2033,7 +2033,7 @@ static int32_t parseDataFromFileImpl(SInsertParseContext* pCxt, SVnodeModifyOpSt } // just record pTableCxt whose data come from file - if (numOfRows > 0) { + if (!pStmt->stbSyntax && numOfRows > 0) { if (NULL == pStmt->pTableCxtHashObj) { pStmt->pTableCxtHashObj = taosHashInit(128, taosGetDefaultHashFunction(TSDB_DATA_TYPE_BINARY), true, HASH_NO_LOCK); @@ -2302,7 +2302,7 @@ static int32_t parseInsertBodyBottom(SInsertParseContext* pCxt, SVnodeModifyOpSt pStmt->freeArrayFunc(pStmt->pVgDataBlocks); pStmt->pVgDataBlocks = NULL; - bool fileOnly = (pStmt->insertType == TSDB_QUERY_TYPE_FILE_INSERT); + bool fileOnly = (!pStmt->stbSyntax && pStmt->insertType == TSDB_QUERY_TYPE_FILE_INSERT); if (fileOnly) { // none data, skip merge & buildvgdata if (0 == taosHashGetSize(pStmt->pTableCxtHashObj)) {