fix: parseOneStbRow fill tag name

This commit is contained in:
Shungang Li 2024-06-28 10:50:13 +08:00
parent e61c5a4083
commit fa6e3c9c6f
1 changed files with 3 additions and 3 deletions

View File

@ -12804,8 +12804,7 @@ static int32_t parseOneStbRow(SMsgBuf* pMsgBuf, SParseFileContext* pParFileCtx)
if (TSDB_CODE_SUCCESS == code) { if (TSDB_CODE_SUCCESS == code) {
SArray* aTagNames = pParFileCtx->tagNameFilled ? NULL : pParFileCtx->aTagNames; SArray* aTagNames = pParFileCtx->tagNameFilled ? NULL : pParFileCtx->aTagNames;
code = parseTagValue(pMsgBuf, &pParFileCtx->pSql, precision, (SSchema*)pTagSchema, &token, code = parseTagValue(pMsgBuf, &pParFileCtx->pSql, precision, (SSchema*)pTagSchema, &token,
pParFileCtx->aTagNames, pParFileCtx->aTagVals, &pParFileCtx->pTag); aTagNames, pParFileCtx->aTagVals, &pParFileCtx->pTag);
pParFileCtx->tagNameFilled = true;
} }
} else { } else {
// parse tbname // parse tbname
@ -12823,7 +12822,8 @@ static int32_t parseOneStbRow(SMsgBuf* pMsgBuf, SParseFileContext* pParFileCtx)
if (TSDB_CODE_SUCCESS != code) break; if (TSDB_CODE_SUCCESS != code) break;
} }
if (TSDB_CODE_SUCCESS == code) { // may fail to handle json if (TSDB_CODE_SUCCESS == code) {
pParFileCtx->tagNameFilled = true;
code = tTagNew(pParFileCtx->aTagVals, 1, false, &pParFileCtx->pTag); code = tTagNew(pParFileCtx->aTagVals, 1, false, &pParFileCtx->pTag);
} }