asereda-gs 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_r267131740
 
 

 ##########
 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:
   Thank you for `LazyEnumerable` @rubenada. 
   Do you mind submitting lazy functionality as separate PR ? I think it makes 
more sense as stand-alone commit. I will review it and merge as soon as 1.19 
release is out. 

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to