You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@asterixdb.apache.org by "Wenhai Li (Code Review)" <do...@asterixdb.incubator.apache.org> on 2015/09/20 04:12:05 UTC
Change in hyracks[master]: PLEASE EDIT to provide a meaningful commit message!
Wenhai Li has uploaded a new change for review.
https://asterix-gerrit.ics.uci.edu/395
Change subject: PLEASE EDIT to provide a meaningful commit message!
......................................................................
PLEASE EDIT to provide a meaningful commit message!
The following commits from your working branch will be included:
commit bf46ee5a435e87dbb689869aa3f8e8605c56e741
Author: Michael <lw...@yahoo.com>
Date: Sat Sep 19 17:57:03 2015 -0700
Commit for one-to-one partition
Change-Id: I835ea712c2f427149d45464fcb3841b8d33f6507
---
M algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/operators/physical/AbstractHashJoinPOperator.java
M algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/properties/PropertiesUtil.java
M algebricks/algebricks-rewriter/src/main/java/org/apache/hyracks/algebricks/rewriter/rules/EnforceStructuralPropertiesRule.java
3 files changed, 136 insertions(+), 74 deletions(-)
git pull ssh://asterix-gerrit.ics.uci.edu:29418/hyracks refs/changes/95/395/1
diff --git a/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/operators/physical/AbstractHashJoinPOperator.java b/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/operators/physical/AbstractHashJoinPOperator.java
index 1091e1a..cdd53e9 100644
--- a/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/operators/physical/AbstractHashJoinPOperator.java
+++ b/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/operators/physical/AbstractHashJoinPOperator.java
@@ -1,20 +1,16 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
+ * Copyright 2009-2013 by The Regents of the University of California
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * you may obtain a copy of the License from
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
package org.apache.hyracks.algebricks.core.algebra.operators.physical;
@@ -138,11 +134,16 @@
Set<LogicalVariable> modifuppreq = new ListSet<LogicalVariable>();
Map<LogicalVariable, EquivalenceClass> eqmap = context.getEquivalenceClassMap(op);
Set<LogicalVariable> covered = new ListSet<LogicalVariable>();
+ Set<LogicalVariable> keysCurrent = uppreq.getColumnSet();
+ List<LogicalVariable> keysFirst = (keysRightBranch.containsAll(keysCurrent)) ? keysRightBranch
+ : keysLeftBranch;
+ List<LogicalVariable> keysSecond = (keysFirst.equals(keysRightBranch)) ? keysLeftBranch
+ : keysRightBranch;
for (LogicalVariable r : uppreq.getColumnSet()) {
EquivalenceClass ecSnd = eqmap.get(r);
boolean found = false;
int j = 0;
- for (LogicalVariable rvar : keysRightBranch) {
+ for (LogicalVariable rvar : keysFirst) {
if (rvar == r || ecSnd != null && eqmap.get(rvar) == ecSnd) {
found = true;
break;
@@ -151,9 +152,9 @@
}
if (!found) {
throw new IllegalStateException("Did not find a variable equivalent to "
- + r + " among " + keysRightBranch);
+ + r + " among " + keysFirst);
}
- LogicalVariable v2 = keysLeftBranch.get(j);
+ LogicalVariable v2 = keysSecond.get(j);
EquivalenceClass ecFst = eqmap.get(v2);
for (LogicalVariable vset1 : set1) {
if (vset1 == v2 || ecFst != null && eqmap.get(vset1) == ecFst) {
diff --git a/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/properties/PropertiesUtil.java b/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/properties/PropertiesUtil.java
index af40f67..143cd93 100644
--- a/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/properties/PropertiesUtil.java
+++ b/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/properties/PropertiesUtil.java
@@ -1,20 +1,16 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
+ * Copyright 2009-2013 by The Regents of the University of California
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * you may obtain a copy of the License from
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
package org.apache.hyracks.algebricks.core.algebra.properties;
@@ -132,11 +128,10 @@
case UNORDERED_PARTITIONED: {
UnorderedPartitionedProperty ur = (UnorderedPartitionedProperty) reqd;
UnorderedPartitionedProperty ud = (UnorderedPartitionedProperty) dlvd;
- if (mayExpandProperties) {
- return isPrefixOf(ud.getColumnSet().iterator(), ur.getColumnSet().iterator());
- } else {
- return ur.getColumnSet().equals(ud.getColumnSet());
- }
+ if (mayExpandProperties)
+ return (!ud.getColumnSet().isEmpty() && ur.getColumnSet().containsAll(ud.getColumnSet()));
+ else
+ return (ud.getColumnSet().equals(ur.getColumnSet()));
}
case ORDERED_PARTITIONED: {
UnorderedPartitionedProperty ur = (UnorderedPartitionedProperty) reqd;
diff --git a/algebricks/algebricks-rewriter/src/main/java/org/apache/hyracks/algebricks/rewriter/rules/EnforceStructuralPropertiesRule.java b/algebricks/algebricks-rewriter/src/main/java/org/apache/hyracks/algebricks/rewriter/rules/EnforceStructuralPropertiesRule.java
index 4df9db7..6cc18e6 100644
--- a/algebricks/algebricks-rewriter/src/main/java/org/apache/hyracks/algebricks/rewriter/rules/EnforceStructuralPropertiesRule.java
+++ b/algebricks/algebricks-rewriter/src/main/java/org/apache/hyracks/algebricks/rewriter/rules/EnforceStructuralPropertiesRule.java
@@ -1,20 +1,16 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
+ * Copyright 2009-2013 by The Regents of the University of California
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * you may obtain a copy of the License from
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
package org.apache.hyracks.algebricks.rewriter.rules;
@@ -24,12 +20,14 @@
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
+import java.util.Set;
import org.apache.commons.lang3.mutable.Mutable;
import org.apache.commons.lang3.mutable.MutableObject;
import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
import org.apache.hyracks.algebricks.common.exceptions.NotImplementedException;
+import org.apache.hyracks.algebricks.common.utils.ListSet;
import org.apache.hyracks.algebricks.common.utils.Pair;
import org.apache.hyracks.algebricks.core.algebra.base.EquivalenceClass;
import org.apache.hyracks.algebricks.core.algebra.base.ILogicalExpression;
@@ -154,10 +152,8 @@
return changed;
}
- private boolean physOptimizeOp(Mutable<ILogicalOperator> opRef, IPhysicalPropertiesVector required,
+ private int getPreferDelivery(Mutable<ILogicalOperator> opRef, IPhysicalPropertiesVector required,
boolean nestedPlan, IOptimizationContext context) throws AlgebricksException {
-
- boolean changed = false;
AbstractLogicalOperator op = (AbstractLogicalOperator) opRef.getValue();
optimizeUsingConstraintsAndEquivClasses(op);
PhysicalRequirements pr = op.getRequiredPhysicalPropertiesForChildren(required);
@@ -165,16 +161,69 @@
if (pr != null) {
reqdProperties = pr.getRequiredProperties();
}
- boolean opIsRedundantSort = false;
+ List<IPartitioningProperty> deliveryPartitioning = new ArrayList<IPartitioningProperty>();
+ for (Mutable<ILogicalOperator> childRef : op.getInputs()) {
+ AbstractLogicalOperator child = (AbstractLogicalOperator) childRef.getValue();
+ deliveryPartitioning.add(child.getDeliveredPhysicalProperties().getPartitioningProperty());
+ }
+
+ boolean matched = false;
+ int coveredBranch = 0;
+ for (int i = 0; i < op.getInputs().size(); i++) {
+ if (true == matched) {
+ matched = false;
+ break;
+ }
+ if (null == reqdProperties
+ || null == reqdProperties[i]
+ || null == reqdProperties[i].getPartitioningProperty()
+ || null == deliveryPartitioning.get(i)
+ || reqdProperties[i].getPartitioningProperty().getPartitioningType() != deliveryPartitioning.get(i)
+ .getPartitioningType())
+ continue;
+ switch (reqdProperties[i].getPartitioningProperty().getPartitioningType()) {
+ case UNORDERED_PARTITIONED: {
+ Set<LogicalVariable> covered = new ListSet<LogicalVariable>();
+ Set<LogicalVariable> setParts = new ListSet<LogicalVariable>();
+ UnorderedPartitionedProperty upp = (UnorderedPartitionedProperty) reqdProperties[i]
+ .getPartitioningProperty();
+ deliveryPartitioning.get(i).getColumns(setParts);
+ for (LogicalVariable v : setParts) {
+ for (LogicalVariable r : upp.getColumnSet()) {
+ if (v == r) {
+ covered.add(v);
+ break;
+ }
+ }
+ }
+ if (covered.equals(setParts)) {
+ coveredBranch = i;
+ matched = true;
+ }
+ break;
+ }
+ case ORDERED_PARTITIONED:
+ break;
+ default:
+ break;
+ }
+ }
+ return coveredBranch;
+ }
+
+ private boolean physOptimizedOpEnforce(AbstractLogicalOperator op, IPhysicalPropertiesVector[] reqdProperties,
+ boolean nestedPlan, IOptimizationContext context, boolean changed, INodeDomain childrenDomain,
+ int coveredBranch) throws AlgebricksException {
// compute properties and figure out the domain
- INodeDomain childrenDomain = null;
+ childrenDomain = null;
{
- int j = 0;
- for (Mutable<ILogicalOperator> childRef : op.getInputs()) {
- AbstractLogicalOperator child = (AbstractLogicalOperator) childRef.getValue();
+ for (int i = 0; i < op.getInputs().size(); i++) {
+ int currentOp = (i + coveredBranch) % op.getInputs().size();
// recursive call
- if (physOptimizeOp(childRef, reqdProperties[j], nestedPlan, context)) {
+ Mutable<ILogicalOperator> childRef = op.getInputs().get(currentOp);
+ AbstractLogicalOperator child = (AbstractLogicalOperator) childRef.getValue();
+ if (physOptimizeOp(childRef, reqdProperties[currentOp], nestedPlan, context)) {
changed = true;
}
child.computeDeliveredPhysicalProperties(context);
@@ -187,10 +236,8 @@
childrenDomain = DEFAULT_DOMAIN;
}
}
- j++;
}
}
-
if (reqdProperties != null) {
for (int k = 0; k < reqdProperties.length; k++) {
IPhysicalPropertiesVector pv = reqdProperties[k];
@@ -200,21 +247,43 @@
}
}
}
+ return changed;
+ }
+
+ private boolean physOptimizeOp(Mutable<ILogicalOperator> opRef, IPhysicalPropertiesVector required,
+ boolean nestedPlan, IOptimizationContext context) throws AlgebricksException {
+
+ boolean changed = false;
+ AbstractLogicalOperator op = (AbstractLogicalOperator) opRef.getValue();
+ optimizeUsingConstraintsAndEquivClasses(op);
+ PhysicalRequirements pr = op.getRequiredPhysicalPropertiesForChildren(required);
+ IPhysicalPropertiesVector[] reqdProperties = null;
+ if (pr != null) {
+ reqdProperties = pr.getRequiredProperties();
+ }
+
+ INodeDomain childrenDomain = null;
+ boolean opIsRedundantSort = false;
+ changed = physOptimizedOpEnforce(op, reqdProperties, nestedPlan, context, changed, childrenDomain, 0);
+
+ int coveredBranch = (op.getInputs().size() == 2) ? getPreferDelivery(opRef, required, nestedPlan, context) : 0;
IPartitioningProperty firstDeliveredPartitioning = null;
- int i = 0;
- for (Mutable<ILogicalOperator> childRef : op.getInputs()) {
- AbstractLogicalOperator child = (AbstractLogicalOperator) childRef.getValue();
+
+ // Handle the conflict of requirement and the delivery
+ for (int j = 0; j < op.getInputs().size(); j++) {
+ int currentOp = (j + coveredBranch) % op.getInputs().size();
+ AbstractLogicalOperator child = (AbstractLogicalOperator) op.getInputs().get(currentOp).getValue();
IPhysicalPropertiesVector delivered = child.getDeliveredPhysicalProperties();
AlgebricksConfig.ALGEBRICKS_LOGGER.finest(">>>> Properties delivered by " + child.getPhysicalOperator()
+ ": " + delivered + "\n");
IPartitioningRequirementsCoordinator prc = pr.getPartitioningCoordinator();
Pair<Boolean, IPartitioningProperty> pbpp = prc.coordinateRequirements(
- reqdProperties[i].getPartitioningProperty(), firstDeliveredPartitioning, op, context);
+ reqdProperties[currentOp].getPartitioningProperty(), firstDeliveredPartitioning, op, context);
boolean mayExpandPartitioningProperties = pbpp.first;
IPhysicalPropertiesVector rqd = new StructuralPropertiesVector(pbpp.second,
- reqdProperties[i].getLocalProperties());
+ reqdProperties[currentOp].getLocalProperties());
AlgebricksConfig.ALGEBRICKS_LOGGER.finest(">>>> Required properties for " + child.getPhysicalOperator()
+ ": " + rqd + "\n");
@@ -227,9 +296,9 @@
if (diff != null) {
changed = true;
- addEnforcers(op, i, diff, rqd, delivered, childrenDomain, nestedPlan, context);
+ addEnforcers(op, currentOp, diff, rqd, delivered, childrenDomain, nestedPlan, context);
- AbstractLogicalOperator newChild = ((AbstractLogicalOperator) op.getInputs().get(i).getValue());
+ AbstractLogicalOperator newChild = ((AbstractLogicalOperator) op.getInputs().get(currentOp).getValue());
if (newChild != child) {
delivered = newChild.getDeliveredPhysicalProperties();
@@ -242,8 +311,8 @@
break;
}
}
-
}
+
if (firstDeliveredPartitioning == null) {
IPartitioningProperty dpp = delivered.getPartitioningProperty();
if (dpp.getPartitioningType() == PartitioningType.ORDERED_PARTITIONED
@@ -251,8 +320,6 @@
firstDeliveredPartitioning = dpp;
}
}
-
- i++;
}
if (op.hasNestedPlans()) {
@@ -598,7 +665,6 @@
}
return ordCols;
}
-
}
private void setNewOp(Mutable<ILogicalOperator> opRef, AbstractLogicalOperator newOp, IOptimizationContext context)
--
To view, visit https://asterix-gerrit.ics.uci.edu/395
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I835ea712c2f427149d45464fcb3841b8d33f6507
Gerrit-PatchSet: 1
Gerrit-Project: hyracks
Gerrit-Branch: master
Gerrit-Owner: Wenhai Li <lw...@yahoo.com>
Change in hyracks[master]: ASTERIXDB-221: reduce unneceesary partitioning for hash joins.
Posted by "Yingyi Bu (Code Review)" <do...@asterixdb.incubator.apache.org>.
Yingyi Bu has posted comments on this change.
Change subject: ASTERIXDB-221: reduce unneceesary partitioning for hash joins.
......................................................................
Patch Set 5: Code-Review+2
--
To view, visit https://asterix-gerrit.ics.uci.edu/395
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I835ea712c2f427149d45464fcb3841b8d33f6507
Gerrit-PatchSet: 5
Gerrit-Project: hyracks
Gerrit-Branch: master
Gerrit-Owner: Wenhai Li <lw...@yahoo.com>
Gerrit-Reviewer: Ian Maxon <im...@apache.org>
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-Reviewer: Preston Carman <pr...@apache.org>
Gerrit-Reviewer: Till Westmann <ti...@apache.org>
Gerrit-Reviewer: Wenhai Li <lw...@yahoo.com>
Gerrit-Reviewer: Yingyi Bu <bu...@gmail.com>
Gerrit-HasComments: No
Change in hyracks[master]: Commit for onetoone join
Posted by "Jenkins (Code Review)" <do...@asterixdb.incubator.apache.org>.
Jenkins has posted comments on this change.
Change subject: Commit for onetoone join
......................................................................
Patch Set 4: Verified+1
Build Successful
https://asterix-jenkins.ics.uci.edu/job/hyracks-gerrit/466/ : SUCCESS
--
To view, visit https://asterix-gerrit.ics.uci.edu/395
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I835ea712c2f427149d45464fcb3841b8d33f6507
Gerrit-PatchSet: 4
Gerrit-Project: hyracks
Gerrit-Branch: master
Gerrit-Owner: Wenhai Li <lw...@yahoo.com>
Gerrit-Reviewer: Ian Maxon <im...@apache.org>
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-Reviewer: Jianfeng Jia <ji...@gmail.com>
Gerrit-Reviewer: Wenhai Li <lw...@yahoo.com>
Gerrit-Reviewer: Yingyi Bu <bu...@gmail.com>
Gerrit-HasComments: No
Change in hyracks[master]: Commit for onetoone join
Posted by "Jenkins (Code Review)" <do...@asterixdb.incubator.apache.org>.
Jenkins has posted comments on this change.
Change subject: Commit for onetoone join
......................................................................
Patch Set 3: Verified-1
Build Failed
https://asterix-jenkins.ics.uci.edu/job/hyracks-gerrit/465/ : ABORTED
--
To view, visit https://asterix-gerrit.ics.uci.edu/395
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I835ea712c2f427149d45464fcb3841b8d33f6507
Gerrit-PatchSet: 3
Gerrit-Project: hyracks
Gerrit-Branch: master
Gerrit-Owner: Wenhai Li <lw...@yahoo.com>
Gerrit-Reviewer: Ian Maxon <im...@apache.org>
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-Reviewer: Jianfeng Jia <ji...@gmail.com>
Gerrit-Reviewer: Wenhai Li <lw...@yahoo.com>
Gerrit-Reviewer: Yingyi Bu <bu...@gmail.com>
Gerrit-HasComments: No
Change in hyracks[master]: PLEASE EDIT to provide a meaningful commit message!
Posted by "Wenhai Li (Code Review)" <do...@asterixdb.incubator.apache.org>.
Hello Jenkins,
I'd like you to reexamine a change. Please visit
https://asterix-gerrit.ics.uci.edu/395
to look at the new patch set (#3).
Change subject: PLEASE EDIT to provide a meaningful commit message!
......................................................................
PLEASE EDIT to provide a meaningful commit message!
The following commits from your working branch will be included:
commit bf46ee5a435e87dbb689869aa3f8e8605c56e741
Author: Michael <lw...@yahoo.com>
Date: Sat Sep 19 17:57:03 2015 -0700
Commit for one-to-one partition
Change-Id: I835ea712c2f427149d45464fcb3841b8d33f6507
---
M algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/operators/physical/AbstractHashJoinPOperator.java
M algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/properties/PropertiesUtil.java
M algebricks/algebricks-rewriter/src/main/java/org/apache/hyracks/algebricks/rewriter/rules/EnforceStructuralPropertiesRule.java
3 files changed, 104 insertions(+), 30 deletions(-)
git pull ssh://asterix-gerrit.ics.uci.edu:29418/hyracks refs/changes/95/395/3
--
To view, visit https://asterix-gerrit.ics.uci.edu/395
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I835ea712c2f427149d45464fcb3841b8d33f6507
Gerrit-PatchSet: 3
Gerrit-Project: hyracks
Gerrit-Branch: master
Gerrit-Owner: Wenhai Li <lw...@yahoo.com>
Gerrit-Reviewer: Ian Maxon <im...@apache.org>
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-Reviewer: Jianfeng Jia <ji...@gmail.com>
Gerrit-Reviewer: Wenhai Li <lw...@yahoo.com>
Gerrit-Reviewer: Yingyi Bu <bu...@gmail.com>
Change in hyracks[master]: ASTERIXDB-221: reduce unneceesary partitioning for hash joins.
Posted by "Yingyi Bu (Code Review)" <do...@asterixdb.incubator.apache.org>.
Yingyi Bu has submitted this change and it was merged.
Change subject: ASTERIXDB-221: reduce unneceesary partitioning for hash joins.
......................................................................
ASTERIXDB-221: reduce unneceesary partitioning for hash joins.
For a hash join, start top-down data property optimization from
a partitioning-compatiable child, and hence the other child's
partitioning requirement could be updated.
Change-Id: I835ea712c2f427149d45464fcb3841b8d33f6507
Reviewed-on: https://asterix-gerrit.ics.uci.edu/395
Tested-by: Jenkins <je...@fulliautomatix.ics.uci.edu>
Reviewed-by: Wenhai Li <lw...@yahoo.com>
Reviewed-by: Yingyi Bu <bu...@gmail.com>
---
M algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/operators/physical/AbstractHashJoinPOperator.java
M algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/properties/PropertiesUtil.java
M algebricks/algebricks-rewriter/src/main/java/org/apache/hyracks/algebricks/rewriter/rules/EnforceStructuralPropertiesRule.java
3 files changed, 65 insertions(+), 21 deletions(-)
Approvals:
Wenhai Li: Looks good to me, but someone else must approve
Yingyi Bu: Looks good to me, approved
Jenkins: Verified
diff --git a/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/operators/physical/AbstractHashJoinPOperator.java b/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/operators/physical/AbstractHashJoinPOperator.java
index 1091e1a..f5ea5f1 100644
--- a/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/operators/physical/AbstractHashJoinPOperator.java
+++ b/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/operators/physical/AbstractHashJoinPOperator.java
@@ -138,11 +138,16 @@
Set<LogicalVariable> modifuppreq = new ListSet<LogicalVariable>();
Map<LogicalVariable, EquivalenceClass> eqmap = context.getEquivalenceClassMap(op);
Set<LogicalVariable> covered = new ListSet<LogicalVariable>();
+ Set<LogicalVariable> keysCurrent = uppreq.getColumnSet();
+ List<LogicalVariable> keysFirst = (keysRightBranch.containsAll(keysCurrent)) ? keysRightBranch
+ : keysLeftBranch;
+ List<LogicalVariable> keysSecond = keysFirst == keysRightBranch ? keysLeftBranch
+ : keysRightBranch;
for (LogicalVariable r : uppreq.getColumnSet()) {
EquivalenceClass ecSnd = eqmap.get(r);
boolean found = false;
int j = 0;
- for (LogicalVariable rvar : keysRightBranch) {
+ for (LogicalVariable rvar : keysFirst) {
if (rvar == r || ecSnd != null && eqmap.get(rvar) == ecSnd) {
found = true;
break;
@@ -151,9 +156,9 @@
}
if (!found) {
throw new IllegalStateException("Did not find a variable equivalent to "
- + r + " among " + keysRightBranch);
+ + r + " among " + keysFirst);
}
- LogicalVariable v2 = keysLeftBranch.get(j);
+ LogicalVariable v2 = keysSecond.get(j);
EquivalenceClass ecFst = eqmap.get(v2);
for (LogicalVariable vset1 : set1) {
if (vset1 == v2 || ecFst != null && eqmap.get(vset1) == ecFst) {
diff --git a/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/properties/PropertiesUtil.java b/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/properties/PropertiesUtil.java
index af40f67..ae9f4f1 100644
--- a/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/properties/PropertiesUtil.java
+++ b/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/properties/PropertiesUtil.java
@@ -132,11 +132,10 @@
case UNORDERED_PARTITIONED: {
UnorderedPartitionedProperty ur = (UnorderedPartitionedProperty) reqd;
UnorderedPartitionedProperty ud = (UnorderedPartitionedProperty) dlvd;
- if (mayExpandProperties) {
- return isPrefixOf(ud.getColumnSet().iterator(), ur.getColumnSet().iterator());
- } else {
- return ur.getColumnSet().equals(ud.getColumnSet());
- }
+ if (mayExpandProperties)
+ return (!ud.getColumnSet().isEmpty() && ur.getColumnSet().containsAll(ud.getColumnSet()));
+ else
+ return (ud.getColumnSet().equals(ur.getColumnSet()));
}
case ORDERED_PARTITIONED: {
UnorderedPartitionedProperty ur = (UnorderedPartitionedProperty) reqd;
diff --git a/algebricks/algebricks-rewriter/src/main/java/org/apache/hyracks/algebricks/rewriter/rules/EnforceStructuralPropertiesRule.java b/algebricks/algebricks-rewriter/src/main/java/org/apache/hyracks/algebricks/rewriter/rules/EnforceStructuralPropertiesRule.java
index 4df9db7..2181efa 100644
--- a/algebricks/algebricks-rewriter/src/main/java/org/apache/hyracks/algebricks/rewriter/rules/EnforceStructuralPropertiesRule.java
+++ b/algebricks/algebricks-rewriter/src/main/java/org/apache/hyracks/algebricks/rewriter/rules/EnforceStructuralPropertiesRule.java
@@ -27,7 +27,6 @@
import org.apache.commons.lang3.mutable.Mutable;
import org.apache.commons.lang3.mutable.MutableObject;
-
import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
import org.apache.hyracks.algebricks.common.exceptions.NotImplementedException;
import org.apache.hyracks.algebricks.common.utils.Pair;
@@ -154,6 +153,43 @@
return changed;
}
+ // Gets the index of a child to start top-down data property enforcement.
+ // If there is a partitioning-compatible child with the operator in opRef, start from this child;
+ // otherwise, start from child zero.
+ private int getStartChildIndex(AbstractLogicalOperator op, PhysicalRequirements pr, boolean nestedPlan,
+ IOptimizationContext context) throws AlgebricksException {
+ IPhysicalPropertiesVector[] reqdProperties = null;
+ if (pr != null) {
+ reqdProperties = pr.getRequiredProperties();
+ }
+
+ List<IPartitioningProperty> deliveredPartitioningPropertiesFromChildren = new ArrayList<IPartitioningProperty>();
+ for (Mutable<ILogicalOperator> childRef : op.getInputs()) {
+ AbstractLogicalOperator child = (AbstractLogicalOperator) childRef.getValue();
+ deliveredPartitioningPropertiesFromChildren.add(child.getDeliveredPhysicalProperties()
+ .getPartitioningProperty());
+ }
+ int partitioningCompatibleChild = 0;
+ for (int i = 0; i < op.getInputs().size(); i++) {
+ IPartitioningProperty deliveredPropertyFromChild = deliveredPartitioningPropertiesFromChildren.get(i);
+ if (reqdProperties == null
+ || reqdProperties[i] == null
+ || reqdProperties[i].getPartitioningProperty() == null
+ || deliveredPropertyFromChild == null
+ || reqdProperties[i].getPartitioningProperty().getPartitioningType() != deliveredPartitioningPropertiesFromChildren
+ .get(i).getPartitioningType()) {
+ continue;
+ }
+ IPartitioningProperty requiredPropertyForChild = reqdProperties[i].getPartitioningProperty();
+ // If child i's delivered partitioning property already satisfies the required property, stop and return the child index.
+ if (PropertiesUtil.matchPartitioningProps(requiredPropertyForChild, deliveredPropertyFromChild, true)) {
+ partitioningCompatibleChild = i;
+ break;
+ }
+ }
+ return partitioningCompatibleChild;
+ }
+
private boolean physOptimizeOp(Mutable<ILogicalOperator> opRef, IPhysicalPropertiesVector required,
boolean nestedPlan, IOptimizationContext context) throws AlgebricksException {
@@ -201,23 +237,31 @@
}
}
+ // The child index of the child operator to optimize first.
+ int startChildIndex = getStartChildIndex(op, pr, nestedPlan, context);
IPartitioningProperty firstDeliveredPartitioning = null;
- int i = 0;
- for (Mutable<ILogicalOperator> childRef : op.getInputs()) {
- AbstractLogicalOperator child = (AbstractLogicalOperator) childRef.getValue();
+ // Enforce data properties in a top-down manner.
+ for (int j = 0; j < op.getInputs().size(); j++) {
+ // Starts from a partitioning-compatible child if any to loop over all children.
+ int childIndex = (j + startChildIndex) % op.getInputs().size();
+ IPhysicalPropertiesVector requiredProperty = reqdProperties[childIndex];
+ AbstractLogicalOperator child = (AbstractLogicalOperator) op.getInputs().get(childIndex).getValue();
IPhysicalPropertiesVector delivered = child.getDeliveredPhysicalProperties();
AlgebricksConfig.ALGEBRICKS_LOGGER.finest(">>>> Properties delivered by " + child.getPhysicalOperator()
+ ": " + delivered + "\n");
IPartitioningRequirementsCoordinator prc = pr.getPartitioningCoordinator();
+ // Coordinates requirements by looking at the firstDeliveredPartitioning.
Pair<Boolean, IPartitioningProperty> pbpp = prc.coordinateRequirements(
- reqdProperties[i].getPartitioningProperty(), firstDeliveredPartitioning, op, context);
+ requiredProperty.getPartitioningProperty(), firstDeliveredPartitioning, op, context);
boolean mayExpandPartitioningProperties = pbpp.first;
IPhysicalPropertiesVector rqd = new StructuralPropertiesVector(pbpp.second,
- reqdProperties[i].getLocalProperties());
+ requiredProperty.getLocalProperties());
AlgebricksConfig.ALGEBRICKS_LOGGER.finest(">>>> Required properties for " + child.getPhysicalOperator()
+ ": " + rqd + "\n");
+ // The partitioning property of reqdProperties[childIndex] could be updated here because
+ // rqd.getPartitioningProperty() is the same object instance as requiredProperty.getPartitioningProperty().
IPhysicalPropertiesVector diff = delivered.getUnsatisfiedPropertiesFrom(rqd,
mayExpandPartitioningProperties, context.getEquivalenceClassMap(child), context.getFDList(child));
@@ -227,9 +271,9 @@
if (diff != null) {
changed = true;
- addEnforcers(op, i, diff, rqd, delivered, childrenDomain, nestedPlan, context);
+ addEnforcers(op, childIndex, diff, rqd, delivered, childrenDomain, nestedPlan, context);
- AbstractLogicalOperator newChild = ((AbstractLogicalOperator) op.getInputs().get(i).getValue());
+ AbstractLogicalOperator newChild = ((AbstractLogicalOperator) op.getInputs().get(childIndex).getValue());
if (newChild != child) {
delivered = newChild.getDeliveredPhysicalProperties();
@@ -242,8 +286,8 @@
break;
}
}
-
}
+
if (firstDeliveredPartitioning == null) {
IPartitioningProperty dpp = delivered.getPartitioningProperty();
if (dpp.getPartitioningType() == PartitioningType.ORDERED_PARTITIONED
@@ -251,8 +295,6 @@
firstDeliveredPartitioning = dpp;
}
}
-
- i++;
}
if (op.hasNestedPlans()) {
@@ -279,7 +321,6 @@
// Now, transfer annotations from the original sort op. to this one.
AbstractLogicalOperator transferTo = nextOp;
if (transferTo.getOperatorTag() == LogicalOperatorTag.EXCHANGE) {
- //
// remove duplicate exchange operator
transferTo = (AbstractLogicalOperator) transferTo.getInputs().get(0).getValue();
}
@@ -598,7 +639,6 @@
}
return ordCols;
}
-
}
private void setNewOp(Mutable<ILogicalOperator> opRef, AbstractLogicalOperator newOp, IOptimizationContext context)
--
To view, visit https://asterix-gerrit.ics.uci.edu/395
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I835ea712c2f427149d45464fcb3841b8d33f6507
Gerrit-PatchSet: 6
Gerrit-Project: hyracks
Gerrit-Branch: master
Gerrit-Owner: Wenhai Li <lw...@yahoo.com>
Gerrit-Reviewer: Ian Maxon <im...@apache.org>
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-Reviewer: Preston Carman <pr...@apache.org>
Gerrit-Reviewer: Till Westmann <ti...@apache.org>
Gerrit-Reviewer: Wenhai Li <lw...@yahoo.com>
Gerrit-Reviewer: Yingyi Bu <bu...@gmail.com>
Change in hyracks[master]: Commit for onetoone join
Posted by "Jenkins (Code Review)" <do...@asterixdb.incubator.apache.org>.
Jenkins has posted comments on this change.
Change subject: Commit for onetoone join
......................................................................
Patch Set 2: Verified+1
Build Successful
https://asterix-jenkins.ics.uci.edu/job/hyracks-gerrit/464/ : SUCCESS
--
To view, visit https://asterix-gerrit.ics.uci.edu/395
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I835ea712c2f427149d45464fcb3841b8d33f6507
Gerrit-PatchSet: 2
Gerrit-Project: hyracks
Gerrit-Branch: master
Gerrit-Owner: Wenhai Li <lw...@yahoo.com>
Gerrit-Reviewer: Ian Maxon <im...@apache.org>
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-Reviewer: Jianfeng Jia <ji...@gmail.com>
Gerrit-Reviewer: Yingyi Bu <bu...@gmail.com>
Gerrit-HasComments: No
Change in hyracks[master]: ASTERIXDB-221: reduce unneceesary partitioning for hash joins.
Posted by "Ildar Absalyamov (Code Review)" <do...@asterixdb.incubator.apache.org>.
Ildar Absalyamov has posted comments on this change.
Change subject: ASTERIXDB-221: reduce unneceesary partitioning for hash joins.
......................................................................
Patch Set 6:
This patch broke the optimization tests in asterix
--
To view, visit https://asterix-gerrit.ics.uci.edu/395
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I835ea712c2f427149d45464fcb3841b8d33f6507
Gerrit-PatchSet: 6
Gerrit-Project: hyracks
Gerrit-Branch: master
Gerrit-Owner: Wenhai Li <lw...@yahoo.com>
Gerrit-Reviewer: Ian Maxon <im...@apache.org>
Gerrit-Reviewer: Ildar Absalyamov <il...@gmail.com>
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-Reviewer: Preston Carman <pr...@apache.org>
Gerrit-Reviewer: Till Westmann <ti...@apache.org>
Gerrit-Reviewer: Wenhai Li <lw...@yahoo.com>
Gerrit-Reviewer: Yingyi Bu <bu...@gmail.com>
Gerrit-HasComments: No
Change in hyracks[master]: PLEASE EDIT to provide a meaningful commit message!
Posted by "Jenkins (Code Review)" <do...@asterixdb.incubator.apache.org>.
Jenkins has posted comments on this change.
Change subject: PLEASE EDIT to provide a meaningful commit message!
......................................................................
Patch Set 1:
Build Started https://asterix-jenkins.ics.uci.edu/job/hyracks-gerrit/463/
--
To view, visit https://asterix-gerrit.ics.uci.edu/395
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I835ea712c2f427149d45464fcb3841b8d33f6507
Gerrit-PatchSet: 1
Gerrit-Project: hyracks
Gerrit-Branch: master
Gerrit-Owner: Wenhai Li <lw...@yahoo.com>
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-HasComments: No
Change in hyracks[master]: ASTERIXDB-221: reduce unneceesary partitioning for hash joins.
Posted by "Yingyi Bu (Code Review)" <do...@asterixdb.incubator.apache.org>.
Hello Jenkins,
I'd like you to reexamine a change. Please visit
https://asterix-gerrit.ics.uci.edu/395
to look at the new patch set (#5).
Change subject: ASTERIXDB-221: reduce unneceesary partitioning for hash joins.
......................................................................
ASTERIXDB-221: reduce unneceesary partitioning for hash joins.
For a hash join, start top-down data property optimization from
a partitioning-compatiable child, and hence the other child's
partitioning requirement could be updated.
Change-Id: I835ea712c2f427149d45464fcb3841b8d33f6507
---
M algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/operators/physical/AbstractHashJoinPOperator.java
M algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/properties/PropertiesUtil.java
M algebricks/algebricks-rewriter/src/main/java/org/apache/hyracks/algebricks/rewriter/rules/EnforceStructuralPropertiesRule.java
3 files changed, 65 insertions(+), 21 deletions(-)
git pull ssh://asterix-gerrit.ics.uci.edu:29418/hyracks refs/changes/95/395/5
--
To view, visit https://asterix-gerrit.ics.uci.edu/395
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I835ea712c2f427149d45464fcb3841b8d33f6507
Gerrit-PatchSet: 5
Gerrit-Project: hyracks
Gerrit-Branch: master
Gerrit-Owner: Wenhai Li <lw...@yahoo.com>
Gerrit-Reviewer: Ian Maxon <im...@apache.org>
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-Reviewer: Wenhai Li <lw...@yahoo.com>
Gerrit-Reviewer: Yingyi Bu <bu...@gmail.com>
Change in hyracks[master]: ASTERIXDB-221: reduce unneceesary partitioning for hash joins.
Posted by "Wenhai Li (Code Review)" <do...@asterixdb.incubator.apache.org>.
Wenhai Li has posted comments on this change.
Change subject: ASTERIXDB-221: reduce unneceesary partitioning for hash joins.
......................................................................
Patch Set 5: Code-Review+1
Looks fine.
--
To view, visit https://asterix-gerrit.ics.uci.edu/395
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I835ea712c2f427149d45464fcb3841b8d33f6507
Gerrit-PatchSet: 5
Gerrit-Project: hyracks
Gerrit-Branch: master
Gerrit-Owner: Wenhai Li <lw...@yahoo.com>
Gerrit-Reviewer: Ian Maxon <im...@apache.org>
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-Reviewer: Wenhai Li <lw...@yahoo.com>
Gerrit-Reviewer: Yingyi Bu <bu...@gmail.com>
Gerrit-HasComments: No
Change in hyracks[master]: ASTERIXDB-221: reduce unneceesary partitioning for hash joins.
Posted by "Jenkins (Code Review)" <do...@asterixdb.incubator.apache.org>.
Jenkins has posted comments on this change.
Change subject: ASTERIXDB-221: reduce unneceesary partitioning for hash joins.
......................................................................
Patch Set 5:
Build Started https://asterix-jenkins.ics.uci.edu/job/hyracks-gerrit/476/
--
To view, visit https://asterix-gerrit.ics.uci.edu/395
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I835ea712c2f427149d45464fcb3841b8d33f6507
Gerrit-PatchSet: 5
Gerrit-Project: hyracks
Gerrit-Branch: master
Gerrit-Owner: Wenhai Li <lw...@yahoo.com>
Gerrit-Reviewer: Ian Maxon <im...@apache.org>
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-Reviewer: Wenhai Li <lw...@yahoo.com>
Gerrit-Reviewer: Yingyi Bu <bu...@gmail.com>
Gerrit-HasComments: No
Change in hyracks[master]: Commit for onetoone join
Posted by "Wenhai Li (Code Review)" <do...@asterixdb.incubator.apache.org>.
Wenhai Li has uploaded a new patch set (#2).
Change subject: Commit for onetoone join
......................................................................
Commit for onetoone join
Change-Id: I835ea712c2f427149d45464fcb3841b8d33f6507
---
M algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/operators/physical/AbstractHashJoinPOperator.java
M algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/properties/PropertiesUtil.java
M algebricks/algebricks-rewriter/src/main/java/org/apache/hyracks/algebricks/rewriter/rules/EnforceStructuralPropertiesRule.java
3 files changed, 136 insertions(+), 74 deletions(-)
git pull ssh://asterix-gerrit.ics.uci.edu:29418/hyracks refs/changes/95/395/2
--
To view, visit https://asterix-gerrit.ics.uci.edu/395
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I835ea712c2f427149d45464fcb3841b8d33f6507
Gerrit-PatchSet: 2
Gerrit-Project: hyracks
Gerrit-Branch: master
Gerrit-Owner: Wenhai Li <lw...@yahoo.com>
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Change in hyracks[master]: ASTERIXDB-221: reduce unneceesary partitioning for hash joins.
Posted by "Jenkins (Code Review)" <do...@asterixdb.incubator.apache.org>.
Jenkins has posted comments on this change.
Change subject: ASTERIXDB-221: reduce unneceesary partitioning for hash joins.
......................................................................
Patch Set 5: Verified+1
Build Successful
https://asterix-jenkins.ics.uci.edu/job/hyracks-gerrit/476/ : SUCCESS
--
To view, visit https://asterix-gerrit.ics.uci.edu/395
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I835ea712c2f427149d45464fcb3841b8d33f6507
Gerrit-PatchSet: 5
Gerrit-Project: hyracks
Gerrit-Branch: master
Gerrit-Owner: Wenhai Li <lw...@yahoo.com>
Gerrit-Reviewer: Ian Maxon <im...@apache.org>
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-Reviewer: Wenhai Li <lw...@yahoo.com>
Gerrit-Reviewer: Yingyi Bu <bu...@gmail.com>
Gerrit-HasComments: No
Change in hyracks[master]: ASTERIXDB-221: reduce unneceesary partitioning for hash joins.
Posted by "Ildar Absalyamov (Code Review)" <do...@asterixdb.incubator.apache.org>.
Ildar Absalyamov has posted comments on this change.
Change subject: ASTERIXDB-221: reduce unneceesary partitioning for hash joins.
......................................................................
Patch Set 6:
Here is a separate review for fixing issues in asterix https://asterix-gerrit.ics.uci.edu/#/c/445/
--
To view, visit https://asterix-gerrit.ics.uci.edu/395
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I835ea712c2f427149d45464fcb3841b8d33f6507
Gerrit-PatchSet: 6
Gerrit-Project: hyracks
Gerrit-Branch: master
Gerrit-Owner: Wenhai Li <lw...@yahoo.com>
Gerrit-Reviewer: Ian Maxon <im...@apache.org>
Gerrit-Reviewer: Ildar Absalyamov <il...@gmail.com>
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-Reviewer: Preston Carman <pr...@apache.org>
Gerrit-Reviewer: Till Westmann <ti...@apache.org>
Gerrit-Reviewer: Wenhai Li <lw...@yahoo.com>
Gerrit-Reviewer: Yingyi Bu <bu...@gmail.com>
Gerrit-HasComments: No
Change in hyracks[master]: Commit for onetoone join
Posted by "Jenkins (Code Review)" <do...@asterixdb.incubator.apache.org>.
Jenkins has posted comments on this change.
Change subject: Commit for onetoone join
......................................................................
Patch Set 2:
Build Started https://asterix-jenkins.ics.uci.edu/job/hyracks-gerrit/464/
--
To view, visit https://asterix-gerrit.ics.uci.edu/395
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I835ea712c2f427149d45464fcb3841b8d33f6507
Gerrit-PatchSet: 2
Gerrit-Project: hyracks
Gerrit-Branch: master
Gerrit-Owner: Wenhai Li <lw...@yahoo.com>
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-HasComments: No
Change in hyracks[master]: Commit for onetoone join
Posted by "Wenhai Li (Code Review)" <do...@asterixdb.incubator.apache.org>.
Wenhai Li has posted comments on this change.
Change subject: Commit for onetoone join
......................................................................
Patch Set 2:
Oh. Actually, the original issue78 gives a situation where asterixdb will enforce hash partition for both LineItem and PS due to the containment verification from join requirement (top-down) to the delivery (bottomup). i.e. Requirement (ps_partkey, ps_suppkey, ps_supplycost) dependents on pk(ps_partkey, ps_suppkey), so the hash_partition is NOT necessary.
for $li in dataset('LineItems')
for $ps in dataset('PartSupp')
where $li.l_partkey = $ps.ps_partkey and $li.l_suppkey = $ps.ps_suppkey and
$li.l_extendedprice = $ps.ps_supplycost
return {
"l_partkey": $li.l_partkey
}
--
To view, visit https://asterix-gerrit.ics.uci.edu/395
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I835ea712c2f427149d45464fcb3841b8d33f6507
Gerrit-PatchSet: 2
Gerrit-Project: hyracks
Gerrit-Branch: master
Gerrit-Owner: Wenhai Li <lw...@yahoo.com>
Gerrit-Reviewer: Ian Maxon <im...@apache.org>
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-Reviewer: Jianfeng Jia <ji...@gmail.com>
Gerrit-Reviewer: Wenhai Li <lw...@yahoo.com>
Gerrit-Reviewer: Yingyi Bu <bu...@gmail.com>
Gerrit-HasComments: No
Change in hyracks[master]: PLEASE EDIT to provide a meaningful commit message!
Posted by "Jenkins (Code Review)" <do...@asterixdb.incubator.apache.org>.
Jenkins has posted comments on this change.
Change subject: PLEASE EDIT to provide a meaningful commit message!
......................................................................
Patch Set 3:
Build Started https://asterix-jenkins.ics.uci.edu/job/hyracks-gerrit/465/
--
To view, visit https://asterix-gerrit.ics.uci.edu/395
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I835ea712c2f427149d45464fcb3841b8d33f6507
Gerrit-PatchSet: 3
Gerrit-Project: hyracks
Gerrit-Branch: master
Gerrit-Owner: Wenhai Li <lw...@yahoo.com>
Gerrit-Reviewer: Ian Maxon <im...@apache.org>
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-Reviewer: Jianfeng Jia <ji...@gmail.com>
Gerrit-Reviewer: Wenhai Li <lw...@yahoo.com>
Gerrit-Reviewer: Yingyi Bu <bu...@gmail.com>
Gerrit-HasComments: No
Change in hyracks[master]: Commit for onetoone join
Posted by "Wenhai Li (Code Review)" <do...@asterixdb.incubator.apache.org>.
Hello Jenkins,
I'd like you to reexamine a change. Please visit
https://asterix-gerrit.ics.uci.edu/395
to look at the new patch set (#4).
Change subject: Commit for onetoone join
......................................................................
Commit for onetoone join
Discover the containment of requirement to delivery from both sides.
The following commits from your working branch will be included:
commit bf46ee5a435e87dbb689869aa3f8e8605c56e741
Author: Michael <lw...@yahoo.com>
Date: Sat Sep 19 17:57:03 2015 -0700
Commit for one-to-one partition
Change-Id: I835ea712c2f427149d45464fcb3841b8d33f6507
---
M algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/operators/physical/AbstractHashJoinPOperator.java
M algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/properties/PropertiesUtil.java
M algebricks/algebricks-rewriter/src/main/java/org/apache/hyracks/algebricks/rewriter/rules/EnforceStructuralPropertiesRule.java
3 files changed, 104 insertions(+), 30 deletions(-)
git pull ssh://asterix-gerrit.ics.uci.edu:29418/hyracks refs/changes/95/395/4
--
To view, visit https://asterix-gerrit.ics.uci.edu/395
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I835ea712c2f427149d45464fcb3841b8d33f6507
Gerrit-PatchSet: 4
Gerrit-Project: hyracks
Gerrit-Branch: master
Gerrit-Owner: Wenhai Li <lw...@yahoo.com>
Gerrit-Reviewer: Ian Maxon <im...@apache.org>
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-Reviewer: Jianfeng Jia <ji...@gmail.com>
Gerrit-Reviewer: Wenhai Li <lw...@yahoo.com>
Gerrit-Reviewer: Yingyi Bu <bu...@gmail.com>
Change in hyracks[master]: Commit for onetoone join
Posted by "Jianfeng Jia (Code Review)" <do...@asterixdb.incubator.apache.org>.
Jianfeng Jia has posted comments on this change.
Change subject: Commit for onetoone join
......................................................................
Patch Set 2:
(3 comments)
Could you give some brief introduction for this change?
https://asterix-gerrit.ics.uci.edu/#/c/395/2/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/operators/physical/AbstractHashJoinPOperator.java
File algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/operators/physical/AbstractHashJoinPOperator.java:
Line 4: * you may not use this file except in compliance with the License.
Replace the new Apache copyright
https://asterix-gerrit.ics.uci.edu/#/c/395/2/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/properties/PropertiesUtil.java
File algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/properties/PropertiesUtil.java:
Line 5: * you may obtain a copy of the License from
replace to the Apache copyright
https://asterix-gerrit.ics.uci.edu/#/c/395/2/algebricks/algebricks-rewriter/src/main/java/org/apache/hyracks/algebricks/rewriter/rules/EnforceStructuralPropertiesRule.java
File algebricks/algebricks-rewriter/src/main/java/org/apache/hyracks/algebricks/rewriter/rules/EnforceStructuralPropertiesRule.java:
Line 2: * Copyright 2009-2013 by The Regents of the University of California
copyright
--
To view, visit https://asterix-gerrit.ics.uci.edu/395
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I835ea712c2f427149d45464fcb3841b8d33f6507
Gerrit-PatchSet: 2
Gerrit-Project: hyracks
Gerrit-Branch: master
Gerrit-Owner: Wenhai Li <lw...@yahoo.com>
Gerrit-Reviewer: Ian Maxon <im...@apache.org>
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-Reviewer: Jianfeng Jia <ji...@gmail.com>
Gerrit-Reviewer: Yingyi Bu <bu...@gmail.com>
Gerrit-HasComments: Yes
Change in hyracks[master]: Commit for onetoone join
Posted by "Jenkins (Code Review)" <do...@asterixdb.incubator.apache.org>.
Jenkins has posted comments on this change.
Change subject: Commit for onetoone join
......................................................................
Patch Set 4:
Build Started https://asterix-jenkins.ics.uci.edu/job/hyracks-gerrit/466/
--
To view, visit https://asterix-gerrit.ics.uci.edu/395
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I835ea712c2f427149d45464fcb3841b8d33f6507
Gerrit-PatchSet: 4
Gerrit-Project: hyracks
Gerrit-Branch: master
Gerrit-Owner: Wenhai Li <lw...@yahoo.com>
Gerrit-Reviewer: Ian Maxon <im...@apache.org>
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-Reviewer: Jianfeng Jia <ji...@gmail.com>
Gerrit-Reviewer: Wenhai Li <lw...@yahoo.com>
Gerrit-Reviewer: Yingyi Bu <bu...@gmail.com>
Gerrit-HasComments: No
Change in hyracks[master]: Commit for onetoone join
Posted by "Jenkins (Code Review)" <do...@asterixdb.incubator.apache.org>.
Jenkins has posted comments on this change.
Change subject: Commit for onetoone join
......................................................................
Patch Set 1: Verified-1
Build Failed
https://asterix-jenkins.ics.uci.edu/job/hyracks-gerrit/463/ : ABORTED
--
To view, visit https://asterix-gerrit.ics.uci.edu/395
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I835ea712c2f427149d45464fcb3841b8d33f6507
Gerrit-PatchSet: 1
Gerrit-Project: hyracks
Gerrit-Branch: master
Gerrit-Owner: Wenhai Li <lw...@yahoo.com>
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-HasComments: No