You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@calcite.apache.org by GitBox <gi...@apache.org> on 2019/03/19 10:04:41 UTC

[GitHub] [calcite] rubenada commented on a change in pull request #1101: [CALCITE-2909] Optimize Enumerable SemiJoin with lazy computation of innerLookup (Ruben Quesada Lopez)

rubenada commented on a change in pull request #1101: [CALCITE-2909] Optimize Enumerable SemiJoin with lazy computation of innerLookup (Ruben Quesada Lopez)
URL: https://github.com/apache/calcite/pull/1101#discussion_r266809207
 
 

 ##########
 File path: linq4j/src/main/java/org/apache/calcite/linq4j/EnumerableDefaults.java
 ##########
 @@ -1297,15 +1297,21 @@ private void closeInner() {
       final Function1<TInner, TKey> innerKeySelector,
       final EqualityComparer<TKey> comparer) {
     return new AbstractEnumerable<TSource>() {
+      private Enumerable<TKey> innerLookup = null;
+      // CALCITE-2909 Delay the computation of the innerLookup until the moment when we are sure
+      // that it will be really needed, i.e. when the first outer enumerator item is processed
+      private Enumerable<TKey> getInnerLookup() {
 
 Review comment:
   I agree, probably it makes sense. I have committed a new version based on a more generic approach.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services