fix: no targets in join issue
This commit is contained in:
parent
efc5589aa2
commit
3f4e82613b
|
@ -575,6 +575,13 @@ static int32_t createJoinLogicNode(SLogicPlanContext* pCxt, SSelectStmt* pSelect
|
|||
}
|
||||
}
|
||||
|
||||
if (NULL == pJoin->node.pTargets) {
|
||||
pJoin->node.pTargets = nodesCloneList(pLeft->pTargets);
|
||||
if (NULL == pJoin->node.pTargets) {
|
||||
code = TSDB_CODE_OUT_OF_MEMORY;
|
||||
}
|
||||
}
|
||||
|
||||
if (TSDB_CODE_SUCCESS == code) {
|
||||
*pLogicNode = (SLogicNode*)pJoin;
|
||||
} else {
|
||||
|
|
|
@ -97,6 +97,12 @@ class TDTestCase:
|
|||
tdSql.query(f"select count(*) from sta a, stb b where a.tg1=b.tg1 and a.ts=b.ts and b.tg2 > 'a' interval(1a);")
|
||||
tdSql.checkRows(3)
|
||||
|
||||
tdSql.query(f"select /*+ batch_scan() */ count(*) from sta a, stb b where a.tg1=b.tg1 and a.ts=b.ts and b.tg2 > 'a' interval(1a);")
|
||||
tdSql.checkRows(3)
|
||||
|
||||
tdSql.query(f"select /*+ no_batch_scan() */ count(*) from sta a, stb b where a.tg1=b.tg1 and a.ts=b.ts and b.tg2 > 'a' interval(1a);")
|
||||
tdSql.checkRows(3)
|
||||
|
||||
|
||||
# tdSql.checkData(0,1,10)
|
||||
|
||||
|
|
Loading…
Reference in New Issue