fix interp in nested query report error

This commit is contained in:
Ganlin Zhao 2023-05-17 17:49:07 +08:00
parent 30b152c434
commit 20684f873e
1 changed files with 2 additions and 2 deletions

View File

@ -1523,9 +1523,9 @@ static int32_t translateInterpFunc(STranslateContext* pCxt, SFunctionNode* pFunc
SSelectStmt* pSelect = (SSelectStmt*)pCxt->pCurrStmt; SSelectStmt* pSelect = (SSelectStmt*)pCxt->pCurrStmt;
SNode* pTable = pSelect->pFromTable; SNode* pTable = pSelect->pFromTable;
if ((NULL != pTable && QUERY_NODE_REAL_TABLE != nodeType(pTable))) { if (NULL != pTable && QUERY_NODE_REAL_TABLE != nodeType(pTable) && QUERY_NODE_TEMP_TABLE != nodeType(pTable)) {
return generateSyntaxErrMsgExt(&pCxt->msgBuf, TSDB_CODE_PAR_ONLY_SUPPORT_SINGLE_TABLE, return generateSyntaxErrMsgExt(&pCxt->msgBuf, TSDB_CODE_PAR_ONLY_SUPPORT_SINGLE_TABLE,
"%s is only supported in single table query", pFunc->functionName); "unsupported table type for %s query", pFunc->functionName);
} }
if (pSelect->hasAggFuncs || pSelect->hasMultiRowsFunc || pSelect->hasIndefiniteRowsFunc) { if (pSelect->hasAggFuncs || pSelect->hasMultiRowsFunc || pSelect->hasIndefiniteRowsFunc) {