opti:modify common type between numbers and string
This commit is contained in:
parent
9bbfff8bf8
commit
e7215c5a24
|
@ -3244,14 +3244,14 @@ static EDealRes translateCaseWhen(STranslateContext* pCxt, SCaseWhenNode* pCaseW
|
|||
}
|
||||
allNullThen = false;
|
||||
if (!selectCommonType(&pCaseWhen->node.resType, &pThenExpr->resType)) {
|
||||
pCxt->errCode = DEAL_RES_ERROR;
|
||||
pCxt->errCode = TSDB_CODE_SCALAR_CONVERT_ERROR;
|
||||
return DEAL_RES_ERROR;
|
||||
}
|
||||
}
|
||||
|
||||
SExprNode* pElseExpr = (SExprNode*)pCaseWhen->pElse;
|
||||
if (pElseExpr && !selectCommonType(&pCaseWhen->node.resType, &pElseExpr->resType)) {
|
||||
pCxt->errCode = DEAL_RES_ERROR;
|
||||
pCxt->errCode = TSDB_CODE_SCALAR_CONVERT_ERROR;
|
||||
return DEAL_RES_ERROR;
|
||||
}
|
||||
|
||||
|
|
|
@ -1144,4 +1144,4 @@ sql_error select case when c_double > 100 then c_varbinary else c_geometry end a
|
|||
sql_error select case when ts > '2022-01-01 00:00:00' then c_bool else c_geometry end as result from t_test;
|
||||
sql_error select case when c_bool then c_double else c_varbinary end as result from t_test;
|
||||
|
||||
|
||||
system sh/exec.sh -n dnode1 -s stop -x SIGINT
|
||||
|
|
Loading…
Reference in New Issue