fix: if not subquery, rewrite project alias

This commit is contained in:
slzhou 2023-10-18 11:04:34 +08:00
parent cdc8b757ad
commit 98d782cfa5
1 changed files with 3 additions and 1 deletions

View File

@ -3318,7 +3318,9 @@ static int32_t checkProjectAlias(STranslateContext* pCxt, SNodeList* pProjection
}
static int32_t translateProjectionList(STranslateContext* pCxt, SSelectStmt* pSelect) {
return rewriteProjectAlias(pSelect->pProjectionList);
if (!pSelect->isSubquery) {
return rewriteProjectAlias(pSelect->pProjectionList);
}
}
static int32_t translateSelectList(STranslateContext* pCxt, SSelectStmt* pSelect) {