[
https://issues.apache.org/jira/browse/CALCITE-3667?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17009153#comment-17009153
]
Julian Hyde commented on CALCITE-3667:
--------------------------------------
I'm not entirely sure, but I think that if you read to the end of the
enumerator (i.e. using filter rather than takeWhile), you either have to go
back to the start or see no data next time you read from it. That means each
time you read from the enumerator you are reading a lot of rows, rather than a
few.
> 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: 1h
> 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)