You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Jin Xing (Jira)" <ji...@apache.org> on 2020/01/04 03:38:00 UTC

[jira] [Comment Edited] (CALCITE-3667) EnumerableMergeJoin should not use take-while enumerator

    [ https://issues.apache.org/jira/browse/CALCITE-3667?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17007901#comment-17007901 ] 

Jin Xing edited comment on CALCITE-3667 at 1/4/20 3:37 AM:
-----------------------------------------------------------

Hi Julian ~
Thanks for look into this ~
I think PR-1717 doesn't change the complexity.
1. MergeJoinEnumerator#advance collect values with left keys and right keys matched;
2. Based on the result from step-1, ConditionalEnumerator filter the values with *nonEquiPredicate*

The logic is similar to *mergeJoin(...).where(...)*, which is proposed by [1] .
I'll close PR-1717, and go by fix from PR-1702

[1] https://github.com/apache/calcite/pull/1702/commits/686d985d4a45b1306d4d397ad51e6cc03fe3ba4d


was (Author: jinxing6042@126.com):
Hi Julian ~
Thanks for look into this ~
I think PR-1717 doesn't change the complexity.
1. MergeJoinEnumerator#advance collect values with left keys and right keys matched;
2. Based on the result from step-1, ConditionalEnumerator filter the values with *nonEquiPredicate*

The logic is similar to *mergeJoin(...).where(...)*, which is proposed by [1] .
I'll close this JIRA, and go by fix from PR-1702

[1] https://github.com/apache/calcite/pull/1702/commits/686d985d4a45b1306d4d397ad51e6cc03fe3ba4d

> EnumerableMergeJoin should not use  take-while enumerator
> ---------------------------------------------------------
>
>                 Key: CALCITE-3667
>                 URL: https://issues.apache.org/jira/browse/CALCITE-3667
>             Project: Calcite
>          Issue Type: Improvement
>            Reporter: Jin Xing
>            Assignee: Jin Xing
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 40m
>  Remaining Estimate: 0h
>
> Currently EnumerableMergeJoin use take-while enumerator [1] to emit values satisfy predicate. However take-while enumerator stops the enumeration at once when predicate is failed, which is not correct and we should finish the enumeration and extract all the qualified  values.
> [1] https://github.com/apache/calcite/blob/master/linq4j/src/main/java/org/apache/calcite/linq4j/EnumerableDefaults.java#L3896



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