rubenada commented on a change in pull request #1156: [CALCITE-2973] Allow
theta joins that have equi conditions to be exec…
URL: https://github.com/apache/calcite/pull/1156#discussion_r316670865
##########
File path:
linq4j/src/main/java/org/apache/calcite/linq4j/EnumerableDefaults.java
##########
@@ -1091,38 +1125,44 @@ public boolean moveNext() {
return true;
}
if (!outers.moveNext()) {
- if (unmatchedKeys != null) {
- // We've seen everything else. If we are doing a RIGHT or
FULL
- // join (leftNull = true) there are any keys which right but
- // not the left.
- List<TInner> list = new ArrayList<>();
- for (TKey key : unmatchedKeys) {
- for (TInner tInner : innerLookup.get(key)) {
- list.add(tInner);
- }
- }
- inners = Linq4j.enumerator(list);
+ if (innersUnmatched != null) {
+ inners = Linq4j.enumerator(new ArrayList<>(innersUnmatched));
Review comment:
Do we really need a new list here? Couldn't this just be:
`inners = Linq4j.enumerator(innersUnmatched);`
?
----------------------------------------------------------------
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