use of org.apache.hyracks.algebricks.core.algebra.properties.IPartitioningProperty in project asterixdb by apache.
the class BroadcastExchangePOperator method computeDeliveredProperties.
@Override
public void computeDeliveredProperties(ILogicalOperator op, IOptimizationContext context) {
IPartitioningProperty pp = new BroadcastPartitioningProperty(domain);
// Broadcasts will destroy input local properties.
this.deliveredProperties = new StructuralPropertiesVector(pp, new ArrayList<ILocalStructuralProperty>());
}
use of org.apache.hyracks.algebricks.core.algebra.properties.IPartitioningProperty in project asterixdb by apache.
the class IntersectPOperator method getRequiredPropertiesForChildren.
@Override
public PhysicalRequirements getRequiredPropertiesForChildren(ILogicalOperator iop, IPhysicalPropertiesVector reqdByParent, IOptimizationContext context) {
IntersectOperator intersectOp = (IntersectOperator) iop;
StructuralPropertiesVector[] pv = new StructuralPropertiesVector[intersectOp.getNumInput()];
for (int i = 0; i < intersectOp.getNumInput(); i++) {
List<ILocalStructuralProperty> localProps = new ArrayList<>();
List<OrderColumn> orderColumns = new ArrayList<>();
for (LogicalVariable column : intersectOp.getInputVariables(i)) {
orderColumns.add(new OrderColumn(column, OrderOperator.IOrder.OrderKind.ASC));
}
localProps.add(new LocalOrderProperty(orderColumns));
IPartitioningProperty pp = null;
if (intersectOp.getExecutionMode() == AbstractLogicalOperator.ExecutionMode.PARTITIONED) {
Set<LogicalVariable> partitioningVariables = new HashSet<>(intersectOp.getInputVariables(i));
pp = new UnorderedPartitionedProperty(partitioningVariables, null);
}
pv[i] = new StructuralPropertiesVector(pp, localProps);
}
return new PhysicalRequirements(pv, IPartitioningRequirementsCoordinator.NO_COORDINATION);
}
use of org.apache.hyracks.algebricks.core.algebra.properties.IPartitioningProperty in project asterixdb by apache.
the class DistributeResultPOperator method getRequiredPropertiesForChildren.
@Override
public PhysicalRequirements getRequiredPropertiesForChildren(ILogicalOperator op, IPhysicalPropertiesVector reqdByParent, IOptimizationContext context) {
DistributeResultOperator write = (DistributeResultOperator) op;
IDataSink sink = write.getDataSink();
IPartitioningProperty pp = sink.getPartitioningProperty();
StructuralPropertiesVector[] r = new StructuralPropertiesVector[] { new StructuralPropertiesVector(pp, null) };
return new PhysicalRequirements(r, IPartitioningRequirementsCoordinator.NO_COORDINATION);
}
use of org.apache.hyracks.algebricks.core.algebra.properties.IPartitioningProperty in project asterixdb by apache.
the class HashPartitionMergeExchangePOperator method computeDeliveredProperties.
@Override
public void computeDeliveredProperties(ILogicalOperator op, IOptimizationContext context) {
IPartitioningProperty p = new UnorderedPartitionedProperty(new ListSet<LogicalVariable>(partitionFields), domain);
AbstractLogicalOperator op2 = (AbstractLogicalOperator) op.getInputs().get(0).getValue();
List<ILocalStructuralProperty> op2Locals = op2.getDeliveredPhysicalProperties().getLocalProperties();
List<ILocalStructuralProperty> locals = new ArrayList<ILocalStructuralProperty>();
for (ILocalStructuralProperty prop : op2Locals) {
if (prop.getPropertyType() == PropertyType.LOCAL_ORDER_PROPERTY) {
locals.add(prop);
} else {
break;
}
}
this.deliveredProperties = new StructuralPropertiesVector(p, locals);
}
use of org.apache.hyracks.algebricks.core.algebra.properties.IPartitioningProperty in project asterixdb by apache.
the class AbstractPropagatePropertiesForUsedVariablesPOperator method computeDeliveredPropertiesForUsedVariables.
public void computeDeliveredPropertiesForUsedVariables(ILogicalOperator op, List<LogicalVariable> usedVariables) {
ILogicalOperator op2 = op.getInputs().get(0).getValue();
IPartitioningProperty pp = op2.getDeliveredPhysicalProperties().getPartitioningProperty();
List<ILocalStructuralProperty> downPropsLocal = op2.getDeliveredPhysicalProperties().getLocalProperties();
List<ILocalStructuralProperty> propsLocal = new ArrayList<ILocalStructuralProperty>();
if (downPropsLocal != null) {
for (ILocalStructuralProperty lsp : downPropsLocal) {
LinkedList<LogicalVariable> cols = new LinkedList<LogicalVariable>();
lsp.getColumns(cols);
ILocalStructuralProperty propagatedProp = lsp.retainVariables(usedVariables);
if (propagatedProp != null) {
propsLocal.add(propagatedProp);
}
}
}
deliveredProperties = new StructuralPropertiesVector(pp, propsLocal);
}
Aggregations