From 61d089496daf6fc2e2280c4c3e2242a8b3ed5295 Mon Sep 17 00:00:00 2001 From: Ganlin Zhao Date: Thu, 15 Jun 2023 10:58:39 +0800 Subject: [PATCH] fix: fix fill double type column with scalar expression error --- source/libs/parser/src/parTranslater.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/source/libs/parser/src/parTranslater.c b/source/libs/parser/src/parTranslater.c index f279485785..7259567b13 100644 --- a/source/libs/parser/src/parTranslater.c +++ b/source/libs/parser/src/parTranslater.c @@ -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"); -- GitLab