add a rule to converet left outer join to inner join
diff --git a/algebricks/algebricks-rewriter/src/main/java/edu/uci/ics/hyracks/algebricks/rewriter/rules/LeftOuterJoinToInnerJoinRule.java b/algebricks/algebricks-rewriter/src/main/java/edu/uci/ics/hyracks/algebricks/rewriter/rules/LeftOuterJoinToInnerJoinRule.java
index d4a077e..247c10d 100644
--- a/algebricks/algebricks-rewriter/src/main/java/edu/uci/ics/hyracks/algebricks/rewriter/rules/LeftOuterJoinToInnerJoinRule.java
+++ b/algebricks/algebricks-rewriter/src/main/java/edu/uci/ics/hyracks/algebricks/rewriter/rules/LeftOuterJoinToInnerJoinRule.java
@@ -37,6 +37,13 @@
/**
* This rule is to convert an outer join into an inner join when possible.
*
+ * The specific pattern this rule will invoke for is:
+ * select not(is-null($v)) // $v is from the right branch of the left outer join below
+ * left-outer-join
+ *
+ * The pattern will be rewritten to:
+ * inner-join
+ *
* @author yingyib
*/
public class LeftOuterJoinToInnerJoinRule implements IAlgebraicRewriteRule {
@@ -65,6 +72,7 @@
return false;
}
ScalarFunctionCallExpression func = (ScalarFunctionCallExpression) condition;
+ /** check if the filter condition on top of the LOJ is not(is-null($v)), where $v is from the right child of LOJ */
if (!convertable(func, joinOp)) {
return false;
}