jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alexparvule...@apache.org
Subject svn commit: r1306337 - /jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/join/QueryEngine.java
Date Wed, 28 Mar 2012 14:01:53 GMT
Author: alexparvulescu
Date: Wed Mar 28 14:01:53 2012
New Revision: 1306337

URL: http://svn.apache.org/viewvc?rev=1306337&view=rev
Log:
JCR-3280 SQL2 joins on empty sets are not efficient

Modified:
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/join/QueryEngine.java

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/join/QueryEngine.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/join/QueryEngine.java?rev=1306337&r1=1306336&r2=1306337&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/join/QueryEngine.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/join/QueryEngine.java
Wed Mar 28 14:01:53 2012
@@ -245,6 +245,11 @@ public class QueryEngine {
         Comparator<Row> rightCo = new RowPathComparator(
                 merger.getRightSelectors());
 
+        if (leftRows == null || leftRows.isEmpty()) {
+            return merger.merge(new RowIteratorAdapter(leftRows),
+                    new RowIteratorAdapter(new TreeSet<Row>()), null, rightCo);
+        }
+
         Set<Row> rightRows = buildRightRowsJoin(csInfo, rightConstraints,
                 isOuterJoin, rightCo, printIndentation + printIndentStep);
 



Mime
View raw message