Merge pull request #23312 from taosdata/szhou/fix/td-26778
fix: remove subquery user alias name distinct check
This commit is contained in:
commit
d7a5b529f9
|
@ -3318,10 +3318,11 @@ static int32_t checkProjectAlias(STranslateContext* pCxt, SNodeList* pProjection
|
||||||
}
|
}
|
||||||
|
|
||||||
static int32_t translateProjectionList(STranslateContext* pCxt, SSelectStmt* pSelect) {
|
static int32_t translateProjectionList(STranslateContext* pCxt, SSelectStmt* pSelect) {
|
||||||
if (pSelect->isSubquery) {
|
if (!pSelect->isSubquery) {
|
||||||
return checkProjectAlias(pCxt, pSelect->pProjectionList, NULL);
|
return rewriteProjectAlias(pSelect->pProjectionList);
|
||||||
|
} else {
|
||||||
|
return TSDB_CODE_SUCCESS;
|
||||||
}
|
}
|
||||||
return rewriteProjectAlias(pSelect->pProjectionList);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int32_t translateSelectList(STranslateContext* pCxt, SSelectStmt* pSelect) {
|
static int32_t translateSelectList(STranslateContext* pCxt, SSelectStmt* pSelect) {
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
system sh/stop_dnodes.sh
|
system sh/stop_dnodes.sh
|
||||||
system sh/deploy.sh -n dnode1 -i 1
|
system sh/deploy.sh -n dnode1 -i 1
|
||||||
|
system sh/cfg.sh -n dnode1 -c keepColumnName -v 1
|
||||||
system sh/exec.sh -n dnode1 -s start
|
system sh/exec.sh -n dnode1 -s start
|
||||||
sql connect
|
sql connect
|
||||||
|
|
||||||
|
@ -50,4 +51,15 @@ print $data00
|
||||||
if $data00 != 2 then
|
if $data00 != 2 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
sql select count(*) from (select f, f from ctcount)
|
||||||
|
print $data00
|
||||||
|
if $data00 != 2 then
|
||||||
|
return -1
|
||||||
|
endi
|
||||||
|
sql select count(*) from (select last(ts), first(ts) from ctcount);
|
||||||
|
print $data00
|
||||||
|
if $data00 != 1 then
|
||||||
|
return -1
|
||||||
|
endi
|
||||||
|
sql_error select f from (select f, f from ctcount);
|
||||||
system sh/exec.sh -n dnode1 -s stop -x SIGINT
|
system sh/exec.sh -n dnode1 -s stop -x SIGINT
|
||||||
|
|
Loading…
Reference in New Issue