提交 2f45a3df 编写于 作者: S slzhou

fix: change variable name

上级 04e9648d
...@@ -6128,7 +6128,7 @@ static bool hasJsonTypeProjection(SSelectStmt* pSelect) { ...@@ -6128,7 +6128,7 @@ static bool hasJsonTypeProjection(SSelectStmt* pSelect) {
return false; return false;
} }
static EDealRes hasVariable(SNode* pNode, void* pContext) { static EDealRes hasColumnOrPseudoColumn(SNode* pNode, void* pContext) {
if (QUERY_NODE_COLUMN == nodeType(pNode)) { if (QUERY_NODE_COLUMN == nodeType(pNode)) {
*(bool*)pContext = true; *(bool*)pContext = true;
return DEAL_RES_END; return DEAL_RES_END;
...@@ -6140,10 +6140,10 @@ static EDealRes hasVariable(SNode* pNode, void* pContext) { ...@@ -6140,10 +6140,10 @@ static EDealRes hasVariable(SNode* pNode, void* pContext) {
return DEAL_RES_CONTINUE; return DEAL_RES_CONTINUE;
} }
static int32_t subtableExprHasVariable(SNode* pNode) { static int32_t subtableExprHasColumnOrPseudoColumn(SNode* pNode) {
bool hasVar = false; bool hasColumn = false;
nodesWalkExprPostOrder(pNode, hasVariable, &hasVar); nodesWalkExprPostOrder(pNode, hasColumnOrPseudoColumn, &hasColumn);
return hasVar; return hasColumn;
} }
static int32_t checkStreamQuery(STranslateContext* pCxt, SCreateStreamStmt* pStmt) { static int32_t checkStreamQuery(STranslateContext* pCxt, SCreateStreamStmt* pStmt) {
...@@ -6157,7 +6157,7 @@ static int32_t checkStreamQuery(STranslateContext* pCxt, SCreateStreamStmt* pStm ...@@ -6157,7 +6157,7 @@ static int32_t checkStreamQuery(STranslateContext* pCxt, SCreateStreamStmt* pStm
return generateSyntaxErrMsgExt(&pCxt->msgBuf, TSDB_CODE_PAR_INVALID_STREAM_QUERY, return generateSyntaxErrMsgExt(&pCxt->msgBuf, TSDB_CODE_PAR_INVALID_STREAM_QUERY,
"SUBTABLE expression must be of VARCHAR type"); "SUBTABLE expression must be of VARCHAR type");
} }
if (NULL != pSelect->pSubtable && 0 == LIST_LENGTH(pSelect->pPartitionByList) && subtableExprHasVariable(pSelect->pSubtable)) { if (NULL != pSelect->pSubtable && 0 == LIST_LENGTH(pSelect->pPartitionByList) && subtableExprHasColumnOrPseudoColumn(pSelect->pSubtable)) {
return generateSyntaxErrMsgExt(&pCxt->msgBuf, TSDB_CODE_PAR_INVALID_STREAM_QUERY, return generateSyntaxErrMsgExt(&pCxt->msgBuf, TSDB_CODE_PAR_INVALID_STREAM_QUERY,
"SUBTABLE expression must not has column when no partition by clause"); "SUBTABLE expression must not has column when no partition by clause");
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册