asterixdb-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Taewoo Kim (Code Review)" <do-not-re...@asterixdb.incubator.apache.org>
Subject Change in hyracks[master]: ASTERIXDB-1204: fixed LIMIT pushdown into innerjoin - Fixed...
Date Sun, 14 Feb 2016 04:44:10 GMT
Taewoo Kim has uploaded a new change for review.

  https://asterix-gerrit.ics.uci.edu/632

Change subject: ASTERIXDB-1204: fixed LIMIT pushdown into innerjoin  - Fixed PushMapOperatorDownThroughProductRule
not to pushdown LIMIT into INNERJOIN operator
......................................................................

ASTERIXDB-1204: fixed LIMIT pushdown into innerjoin
 - Fixed PushMapOperatorDownThroughProductRule not to pushdown LIMIT into INNERJOIN operator

Change-Id: I19e73c8d444ac0c8ecfcdf3ad3ebe744d6c8d0df
---
M algebricks/algebricks-rewriter/src/main/java/org/apache/hyracks/algebricks/rewriter/rules/PushMapOperatorDownThroughProductRule.java
1 file changed, 4 insertions(+), 3 deletions(-)


  git pull ssh://asterix-gerrit.ics.uci.edu:29418/hyracks refs/changes/32/632/1

diff --git a/algebricks/algebricks-rewriter/src/main/java/org/apache/hyracks/algebricks/rewriter/rules/PushMapOperatorDownThroughProductRule.java
b/algebricks/algebricks-rewriter/src/main/java/org/apache/hyracks/algebricks/rewriter/rules/PushMapOperatorDownThroughProductRule.java
index 1c9b8d8..901bce4 100644
--- a/algebricks/algebricks-rewriter/src/main/java/org/apache/hyracks/algebricks/rewriter/rules/PushMapOperatorDownThroughProductRule.java
+++ b/algebricks/algebricks-rewriter/src/main/java/org/apache/hyracks/algebricks/rewriter/rules/PushMapOperatorDownThroughProductRule.java
@@ -22,7 +22,6 @@
 import java.util.List;
 
 import org.apache.commons.lang3.mutable.Mutable;
-
 import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 import org.apache.hyracks.algebricks.core.algebra.base.ILogicalOperator;
 import org.apache.hyracks.algebricks.core.algebra.base.IOptimizationContext;
@@ -37,7 +36,8 @@
 public class PushMapOperatorDownThroughProductRule implements IAlgebraicRewriteRule {
 
     @Override
-    public boolean rewritePre(Mutable<ILogicalOperator> opRef, IOptimizationContext
context) throws AlgebricksException {
+    public boolean rewritePre(Mutable<ILogicalOperator> opRef, IOptimizationContext
context)
+            throws AlgebricksException {
         return false;
     }
 
@@ -45,7 +45,8 @@
     public boolean rewritePost(Mutable<ILogicalOperator> opRef, IOptimizationContext
context)
             throws AlgebricksException {
         AbstractLogicalOperator op1 = (AbstractLogicalOperator) opRef.getValue();
-        if (!op1.isMap()) {
+        // Even the LIMIT operator is a map operator, we don't push LIMIT operator into a
join.
+        if (!op1.isMap() || op1.getOperatorTag() == LogicalOperatorTag.LIMIT) {
             return false;
         }
         Mutable<ILogicalOperator> op2Ref = op1.getInputs().get(0);

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/632
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I19e73c8d444ac0c8ecfcdf3ad3ebe744d6c8d0df
Gerrit-PatchSet: 1
Gerrit-Project: hyracks
Gerrit-Branch: master
Gerrit-Owner: Taewoo Kim <wangsaeu@gmail.com>

Mime
View raw message