[ 
https://issues.apache.org/jira/browse/CALCITE-4809?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Quan Chao updated CALCITE-4809:
-------------------------------
    Description: 
The result of mixed merge join is incomplete. The merge join relies on the row 
data of the two tables to be sorted by the join field, but if the left table 
itself is a left join, nulls may appear due to mismatches, causing the entire 
join to end early。

  EG:

   t1 left join t2 on t1.id=t2.id join t3 on t2.id=t3.id;

   t1 rows: 1,2,3,4

   t2 rows: 1,2,4

   t3 rows: 1.2.3.4

   final result is:1,2.  but 4 is lost;

   when MergeJoinEnumerator left (t1xt2) come to: 3,null, right (t3) is 3, the 
null <3 cause left  advance finish wrong

  was:
The result of mixed merge join is incomplete. The merge join relies on the row 
data of the two tables to be sorted by the join field, but if the left table 
itself is a left join, nulls may appear due to mismatches, causing the entire 
join to end early。

  EG:

   t1 left join t2 on t1.id=t2.id join t3 on t2.id=t3.id;

   t1 rows: 1,2,3,4

   t2 rows: 1,2,4

   t3 rows: 1.2.3.4

   final result is:1,2, 4 is lost;

   when MergeJoinEnumerator left (t1xt2) come to: 3,null, right (t3) is 3, the 
null <3 cause left  advance finish wrong


> Mixed merge join result is incomplete 
> --------------------------------------
>
>                 Key: CALCITE-4809
>                 URL: https://issues.apache.org/jira/browse/CALCITE-4809
>             Project: Calcite
>          Issue Type: Bug
>          Components: linq4j
>    Affects Versions: 1.26.0
>            Reporter: Quan Chao
>            Priority: Major
>
> The result of mixed merge join is incomplete. The merge join relies on the 
> row data of the two tables to be sorted by the join field, but if the left 
> table itself is a left join, nulls may appear due to mismatches, causing the 
> entire join to end early。
>   EG:
>    t1 left join t2 on t1.id=t2.id join t3 on t2.id=t3.id;
>    t1 rows: 1,2,3,4
>    t2 rows: 1,2,4
>    t3 rows: 1.2.3.4
>    final result is:1,2.  but 4 is lost;
>    when MergeJoinEnumerator left (t1xt2) come to: 3,null, right (t3) is 3, 
> the null <3 cause left  advance finish wrong



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to