fix: join condition push down issue
This commit is contained in:
parent
db807020a0
commit
8ce9e6ee1d
|
@ -635,7 +635,9 @@ static EDealRes pdcJoinIsCrossTableCond(SNode* pNode, void* pContext) {
|
|||
if (QUERY_NODE_COLUMN == nodeType(pNode)) {
|
||||
if (pdcJoinColInTableList(pNode, pCxt->pLeftTbls)) {
|
||||
pCxt->havaLeftCol = true;
|
||||
} else if (pdcJoinColInTableList(pNode, pCxt->pRightTbls)) {
|
||||
}
|
||||
|
||||
if (pdcJoinColInTableList(pNode, pCxt->pRightTbls)) {
|
||||
pCxt->haveRightCol = true;
|
||||
}
|
||||
return pCxt->havaLeftCol && pCxt->haveRightCol ? DEAL_RES_END : DEAL_RES_CONTINUE;
|
||||
|
|
|
@ -32,6 +32,13 @@ sql select a.t1 from (select * from sta partition by tbname order by ts desc) a
|
|||
if $rows != 12 then
|
||||
return -1
|
||||
endi
|
||||
sql select a.ts from (select last(tba1.ts) as ts from tba1, tba2 where tba1.ts = tba2.ts) as a join (select ts from tba2) as tba2 on a.ts = tba2.ts;
|
||||
if $rows != 1 then
|
||||
return -1
|
||||
endi
|
||||
if $data00 != @23-11-17 16:29:03.000@ then
|
||||
return -1
|
||||
endi
|
||||
|
||||
#left join + non join
|
||||
sql_error select a.*,b.* from (select * from sta partition by tbname) a left join (select * from sta partition by tbname order by ts) b on a.ts = b.ts;
|
||||
|
|
Loading…
Reference in New Issue