dynamobi/dynamobi — Issue #462: [FNL-46] Projecting out of outer join using JavaCalc generates wrong results
Author: dynamobi-build
Created: 2011-12-30 03:28:02+00:00
State: open
Labels: FNL

[reporter="rchen", created="Mon, 7 Aug 2006 18:37:50 -0500 (GMT-05:00)"]
The following query returns wrong results. When traced in the debugger, the CartesianProduct produces correct outputs.

set schema 'sales';

-- Q1

select depts.name from emps left outer join depts on TRUE;

-- Q2

select depts.deptno from emps left outer join depts on TRUE;

Q1 Plan:

+-------------------------------------------------------------------------------------------------------------------------------------------------------+

| IterCalcRel(expr#0..1=[{inputs}], NAME=[$t1]) |

| FennelToIteratorConverter |

| FennelCartesianProductRel(leftouterjoin=[true]) |

| FtrsIndexScanRel(table=[[LOCALDB, SALES, EMPS]], projection=[[0]], index=[EMPS_UX], preserveOrder=[false]) |

| FtrsIndexScanRel(table=[[LOCALDB, SALES, DEPTS]], projection=[[1]], index=[SYS$CONSTRAINT_INDEX$DEPTS$SYS$PRIMARY_KEY], preserveOrder=[false]) |

+-------------------------------------------------------------------------------------------------------------------------------------------------------+

Q2 Plan:

+-------------------------------------------------------------------------------------------------------------------------------------------------------+

| IterCalcRel(expr#0..1=[{inputs}], DEPTNO=[$t1]) |

| FennelToIteratorConverter |

| FennelCartesianProductRel(leftouterjoin=[true]) |

| FtrsIndexScanRel(table=[[LOCALDB, SALES, EMPS]], projection=[[0]], index=[EMPS_UX], preserveOrder=[false]) |

| FtrsIndexScanRel(table=[[LOCALDB, SALES, DEPTS]], projection=[[0]], index=[SYS$CONSTRAINT_INDEX$DEPTS$SYS$PRIMARY_KEY], preserveOrder=[false]) |

+-------------------------------------------------------------------------------------------------------------------------------------------------------+