protected boolean checkEquivalentFieldPositionsInKeyFields(FieldList fields1, FieldList fields2) { // check number of produced partitioning fields if(fields1.size() != fields2.size()) { return false; } else { return checkEquivalentFieldPositionsInKeyFields(fields1, fields2, fields1.size()); } }
placePipelineBreakersIfNecessary(operator.getStrategy(), in1, in2); DualInputPlanNode node = operator.instantiate(in1, in2, this); node.setBroadcastInputs(broadcastChannelsCombination); GlobalProperties gp2 = in2.getGlobalProperties().clone() .filterBySemanticProperties(semPropsGlobalPropFiltering, 1); GlobalProperties combined = operator.computeGlobalProperties(gp1, gp2); LocalProperties lp2 = in2.getLocalProperties().clone() .filterBySemanticProperties(semPropsLocalPropFiltering, 1); LocalProperties locals = operator.computeLocalProperties(lp1, lp2);
public List<GlobalPropertiesPair> getPossibleGlobalProperties() { if (this.globalProps == null) { this.globalProps = createPossibleGlobalProperties(); } return this.globalProps; }
@Override public void computeInterestingPropertiesForInputs(CostEstimator estimator) { // get what we inherit and what is preserved by our user code final InterestingProperties props1 = getInterestingProperties().filterByCodeAnnotations(this, 0); final InterestingProperties props2 = getInterestingProperties().filterByCodeAnnotations(this, 1); // add all properties relevant to this node for (OperatorDescriptorDual dpd : getProperties()) { for (GlobalPropertiesPair gp : dpd.getPossibleGlobalProperties()) { // input 1 props1.addGlobalProperties(gp.getProperties1()); // input 2 props2.addGlobalProperties(gp.getProperties2()); } for (LocalPropertiesPair lp : dpd.getPossibleLocalProperties()) { // input 1 props1.addLocalProperties(lp.getProperties1()); // input 2 props2.addLocalProperties(lp.getProperties2()); } } this.input1.setInterestingProperties(props1); this.input2.setInterestingProperties(props2); for (DagConnection conn : getBroadcastConnections()) { conn.setInterestingProperties(new InterestingProperties()); } }
Set<LocalPropertiesPair> pairsLoc = new HashSet<LocalPropertiesPair>(); for (OperatorDescriptorDual ods : getProperties()) { pairsGlob.addAll(ods.getPossibleGlobalProperties()); pairsLoc.addAll(ods.getPossibleLocalProperties()); if (desc.areCompatible(gpp.getProperties1(), gpp.getProperties2(), c1.getGlobalProperties(), c2.getGlobalProperties()))
for (LocalPropertiesPair lpp : dps.getPossibleLocalProperties()) { if (lpp.getProperties1().isMetBy(in1.getLocalProperties()) && lpp.getProperties2().isMetBy(in2.getLocalProperties()) ) if (dps.areCoFulfilled(lpp.getProperties1(), lpp.getProperties2(), in1.getLocalProperties(), in2.getLocalProperties()))
public List<LocalPropertiesPair> getPossibleLocalProperties() { if (this.localProps == null) { this.localProps = createPossibleLocalProperties(); } return this.localProps; }
Set<LocalPropertiesPair> pairsLoc = new HashSet<LocalPropertiesPair>(); for (OperatorDescriptorDual ods : getProperties()) { pairsGlob.addAll(ods.getPossibleGlobalProperties()); pairsLoc.addAll(ods.getPossibleLocalProperties()); if (desc.areCompatible(gpp.getProperties1(), gpp.getProperties2(), c1.getGlobalProperties(), c2.getGlobalProperties()))
@Override public void computeInterestingPropertiesForInputs(CostEstimator estimator) { // get what we inherit and what is preserved by our user code final InterestingProperties props1 = getInterestingProperties().filterByCodeAnnotations(this, 0); final InterestingProperties props2 = getInterestingProperties().filterByCodeAnnotations(this, 1); // add all properties relevant to this node for (OperatorDescriptorDual dpd : getProperties()) { for (GlobalPropertiesPair gp : dpd.getPossibleGlobalProperties()) { // input 1 props1.addGlobalProperties(gp.getProperties1()); // input 2 props2.addGlobalProperties(gp.getProperties2()); } for (LocalPropertiesPair lp : dpd.getPossibleLocalProperties()) { // input 1 props1.addLocalProperties(lp.getProperties1()); // input 2 props2.addLocalProperties(lp.getProperties2()); } } this.input1.setInterestingProperties(props1); this.input2.setInterestingProperties(props2); for (DagConnection conn : getBroadcastConnections()) { conn.setInterestingProperties(new InterestingProperties()); } }
for (LocalPropertiesPair lpp : dps.getPossibleLocalProperties()) { if (lpp.getProperties1().isMetBy(in1.getLocalProperties()) && lpp.getProperties2().isMetBy(in2.getLocalProperties()) ) if (dps.areCoFulfilled(lpp.getProperties1(), lpp.getProperties2(), in1.getLocalProperties(), in2.getLocalProperties()))
public List<LocalPropertiesPair> getPossibleLocalProperties() { if (this.localProps == null) { this.localProps = createPossibleLocalProperties(); } return this.localProps; }
placePipelineBreakersIfNecessary(operator.getStrategy(), in1, in2); DualInputPlanNode node = operator.instantiate(in1, in2, this); node.setBroadcastInputs(broadcastChannelsCombination); GlobalProperties gp2 = in2.getGlobalProperties().clone() .filterBySemanticProperties(semPropsGlobalPropFiltering, 1); GlobalProperties combined = operator.computeGlobalProperties(gp1, gp2); LocalProperties lp2 = in2.getLocalProperties().clone() .filterBySemanticProperties(semPropsLocalPropFiltering, 1); LocalProperties locals = operator.computeLocalProperties(lp1, lp2);
Set<LocalPropertiesPair> pairsLoc = new HashSet<LocalPropertiesPair>(); for (OperatorDescriptorDual ods : getProperties()) { pairsGlob.addAll(ods.getPossibleGlobalProperties()); pairsLoc.addAll(ods.getPossibleLocalProperties()); if (desc.areCompatible(gpp.getProperties1(), gpp.getProperties2(), c1.getGlobalProperties(), c2.getGlobalProperties()))
@Override public void computeInterestingPropertiesForInputs(CostEstimator estimator) { // get what we inherit and what is preserved by our user code final InterestingProperties props1 = getInterestingProperties().filterByCodeAnnotations(this, 0); final InterestingProperties props2 = getInterestingProperties().filterByCodeAnnotations(this, 1); // add all properties relevant to this node for (OperatorDescriptorDual dpd : getProperties()) { for (GlobalPropertiesPair gp : dpd.getPossibleGlobalProperties()) { // input 1 props1.addGlobalProperties(gp.getProperties1()); // input 2 props2.addGlobalProperties(gp.getProperties2()); } for (LocalPropertiesPair lp : dpd.getPossibleLocalProperties()) { // input 1 props1.addLocalProperties(lp.getProperties1()); // input 2 props2.addLocalProperties(lp.getProperties2()); } } this.input1.setInterestingProperties(props1); this.input2.setInterestingProperties(props2); for (DagConnection conn : getBroadcastConnections()) { conn.setInterestingProperties(new InterestingProperties()); } }
for (LocalPropertiesPair lpp : dps.getPossibleLocalProperties()) { if (lpp.getProperties1().isMetBy(in1.getLocalProperties()) && lpp.getProperties2().isMetBy(in2.getLocalProperties()) ) if (dps.areCoFulfilled(lpp.getProperties1(), lpp.getProperties2(), in1.getLocalProperties(), in2.getLocalProperties()))
protected boolean checkSameOrdering(GlobalProperties produced1, GlobalProperties produced2, int numRelevantFields) { Ordering prod1 = produced1.getPartitioningOrdering(); Ordering prod2 = produced2.getPartitioningOrdering(); if (prod1 == null || prod2 == null) { throw new CompilerException("The given properties do not meet this operators requirements."); } // check that order of fields is equivalent if (!checkEquivalentFieldPositionsInKeyFields( prod1.getInvolvedIndexes(), prod2.getInvolvedIndexes(), numRelevantFields)) { return false; } // check that both inputs have the same directions of order for (int i = 0; i < numRelevantFields; i++) { if (prod1.getOrder(i) != prod2.getOrder(i)) { return false; } } return true; }
public List<LocalPropertiesPair> getPossibleLocalProperties() { if (this.localProps == null) { this.localProps = createPossibleLocalProperties(); } return this.localProps; }
public List<GlobalPropertiesPair> getPossibleGlobalProperties() { if (this.globalProps == null) { this.globalProps = createPossibleGlobalProperties(); } return this.globalProps; }
placePipelineBreakersIfNecessary(operator.getStrategy(), in1, in2); DualInputPlanNode node = operator.instantiate(in1, in2, this); node.setBroadcastInputs(broadcastChannelsCombination); GlobalProperties gp2 = in2.getGlobalProperties().clone() .filterBySemanticProperties(semPropsGlobalPropFiltering, 1); GlobalProperties combined = operator.computeGlobalProperties(gp1, gp2); LocalProperties lp2 = in2.getLocalProperties().clone() .filterBySemanticProperties(semPropsLocalPropFiltering, 1); LocalProperties locals = operator.computeLocalProperties(lp1, lp2);
Set<LocalPropertiesPair> pairsLoc = new HashSet<LocalPropertiesPair>(); for (OperatorDescriptorDual ods : getProperties()) { pairsGlob.addAll(ods.getPossibleGlobalProperties()); pairsLoc.addAll(ods.getPossibleLocalProperties()); if (desc.areCompatible(gpp.getProperties1(), gpp.getProperties2(), c1.getGlobalProperties(), c2.getGlobalProperties()))