fix: empty table name for tbname issue

This commit is contained in:
dapan1121 2023-08-18 15:00:00 +08:00
parent 3f4e82613b
commit 581f04a18b
1 changed files with 1 additions and 1 deletions

View File

@ -2013,7 +2013,7 @@ static EDealRes collectFuncs(SNode* pNode, void* pContext) {
SFunctionNode* pFunc = (SFunctionNode*)pNode; SFunctionNode* pFunc = (SFunctionNode*)pNode;
if (FUNCTION_TYPE_TBNAME == pFunc->funcType && pCxt->tableAlias) { if (FUNCTION_TYPE_TBNAME == pFunc->funcType && pCxt->tableAlias) {
SValueNode* pVal = (SValueNode*)nodesListGetNode(pFunc->pParameterList, 0); SValueNode* pVal = (SValueNode*)nodesListGetNode(pFunc->pParameterList, 0);
if (strcmp(pVal->literal, pCxt->tableAlias)) { if (pVal && strcmp(pVal->literal, pCxt->tableAlias)) {
return DEAL_RES_CONTINUE; return DEAL_RES_CONTINUE;
} }
} }