Index: src/main/java/org/apache/jackrabbit/core/query/lucene/join/QueryEngine.java
===================================================================
--- src/main/java/org/apache/jackrabbit/core/query/lucene/join/QueryEngine.java	(revision 1303545)
+++ src/main/java/org/apache/jackrabbit/core/query/lucene/join/QueryEngine.java	(working copy)
@@ -245,6 +245,11 @@
         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);
 
