fix: minus operator resType

This commit is contained in:
factosea 2024-12-11 16:02:25 +08:00
parent e372b02c3b
commit ed59e85dab
1 changed files with 2 additions and 2 deletions

View File

@ -1673,8 +1673,8 @@ static int32_t sclGetMinusOperatorResType(SOperatorNode *pOp) {
if (!IS_MATHABLE_TYPE(((SExprNode *)(pOp->pLeft))->resType.type)) { if (!IS_MATHABLE_TYPE(((SExprNode *)(pOp->pLeft))->resType.type)) {
return TSDB_CODE_TSC_INVALID_OPERATION; return TSDB_CODE_TSC_INVALID_OPERATION;
} }
pOp->node.resType.type = TSDB_DATA_TYPE_DOUBLE; pOp->node.resType.type = ((SExprNode *)(pOp->pLeft))->resType.type;
pOp->node.resType.bytes = tDataTypes[TSDB_DATA_TYPE_DOUBLE].bytes; pOp->node.resType.bytes = tDataTypes[((SExprNode *)(pOp->pLeft))->resType.type].bytes;
return TSDB_CODE_SUCCESS; return TSDB_CODE_SUCCESS;
} }