fix: fix fill double type column with scalar expression error

This commit is contained in:
Ganlin Zhao 2023-06-15 10:58:39 +08:00
parent 68f5f707e2
commit 61d089496d
1 changed files with 6 additions and 6 deletions

View File

@ -3055,13 +3055,13 @@ static bool needFill(SNode* pNode) {
static int32_t convertFillValue(STranslateContext* pCxt, SDataType dt, SNodeList* pValues, int32_t index) {
SListCell* pCell = nodesListGetCell(pValues, index);
if (dataTypeEqual(&dt, &((SExprNode*)pCell->pNode)->resType)) {
return TSDB_CODE_SUCCESS;
}
SNode* pCaseFunc = NULL;
int32_t code = createCastFunc(pCxt, pCell->pNode, dt, &pCaseFunc);
//if (dataTypeEqual(&dt, &((SExprNode*)pCell->pNode)->resType)) {
// return TSDB_CODE_SUCCESS;
//}
SNode* pCastFunc = NULL;
int32_t code = createCastFunc(pCxt, pCell->pNode, dt, &pCastFunc);
if (TSDB_CODE_SUCCESS == code) {
code = scalarCalculateConstants(pCaseFunc, &pCell->pNode);
code = scalarCalculateConstants(pCastFunc, &pCell->pNode);
}
if (TSDB_CODE_SUCCESS == code && QUERY_NODE_VALUE != nodeType(pCell->pNode)) {
code = generateSyntaxErrMsgExt(&pCxt->msgBuf, TSDB_CODE_PAR_WRONG_VALUE_TYPE, "Fill value can only accept constant");