fix: fix fill double type column with scalar expression error
This commit is contained in:
parent
68f5f707e2
commit
61d089496d
|
@ -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");
|
||||
|
|
Loading…
Reference in New Issue