fix(query): set the correct result field length for first/last query.

This commit is contained in:
Haojun Liao 2022-05-06 18:16:16 +08:00
parent 1315f8e510
commit 809a3eda25
1 changed files with 1 additions and 2 deletions

View File

@ -242,8 +242,7 @@ static int32_t translateFirstLast(SFunctionNode* pFunc, char* pErrBuf, int32_t l
"The parameters of first/last can only be columns");
}
uint8_t paraType = ((SExprNode*)pPara)->resType.type;
pFunc->node.resType = (SDataType){.bytes = tDataTypes[paraType].bytes, .type = paraType};
pFunc->node.resType = ((SExprNode*)pPara)->resType;
return TSDB_CODE_SUCCESS;
}