calc stream tag size

This commit is contained in:
54liuyao 2024-03-07 14:23:30 +08:00
parent dbc76c5361
commit f26b7f78f5
1 changed files with 3 additions and 1 deletions

View File

@ -8135,7 +8135,9 @@ static int32_t adjustTagsForCreateTable(STranslateContext* pCxt, SCreateStreamSt
SColumnDefNode* pDef = (SColumnDefNode*)pTagDef;
if (!dataTypeEqual(&pDef->dataType, &((SExprNode*)pTagExpr)->resType)) {
SNode* pFunc = NULL;
int32_t code = createCastFunc(pCxt, pTagExpr, pDef->dataType, &pFunc);
SDataType defType = pDef->dataType;
defType.bytes = calcTypeBytes(defType);
int32_t code = createCastFunc(pCxt, pTagExpr, defType, &pFunc);
if (TSDB_CODE_SUCCESS != code) {
return code;
}