fix: empty param issue
This commit is contained in:
parent
6d00f5dd39
commit
3bd2272332
|
@ -69,10 +69,12 @@ static EDealRes doCreateColumn(SNode* pNode, void* pContext) {
|
||||||
SFunctionNode* pFunc = (SFunctionNode*)pNode;
|
SFunctionNode* pFunc = (SFunctionNode*)pNode;
|
||||||
if (pFunc->funcType == FUNCTION_TYPE_TBNAME) {
|
if (pFunc->funcType == FUNCTION_TYPE_TBNAME) {
|
||||||
SValueNode* pVal = (SValueNode*)nodesListGetNode(pFunc->pParameterList, 0);
|
SValueNode* pVal = (SValueNode*)nodesListGetNode(pFunc->pParameterList, 0);
|
||||||
|
if (NULL != pVal) {
|
||||||
strcpy(pCol->tableAlias, pVal->literal);
|
strcpy(pCol->tableAlias, pVal->literal);
|
||||||
strcpy(pCol->tableName, pVal->literal);
|
strcpy(pCol->tableName, pVal->literal);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return (TSDB_CODE_SUCCESS == nodesListStrictAppend(pCxt->pList, (SNode*)pCol) ? DEAL_RES_IGNORE_CHILD
|
return (TSDB_CODE_SUCCESS == nodesListStrictAppend(pCxt->pList, (SNode*)pCol) ? DEAL_RES_IGNORE_CHILD
|
||||||
: DEAL_RES_ERROR);
|
: DEAL_RES_ERROR);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue