Search in sources :

Example 21 with IPhysicalPropertiesVector

use of org.apache.hyracks.algebricks.core.algebra.properties.IPhysicalPropertiesVector in project asterixdb by apache.

the class IndexInsertDeleteUpsertPOperator method getRequiredPropertiesForChildren.

@Override
public PhysicalRequirements getRequiredPropertiesForChildren(ILogicalOperator op, IPhysicalPropertiesVector reqdByParent, IOptimizationContext context) {
    List<LogicalVariable> scanVariables = new ArrayList<LogicalVariable>();
    scanVariables.addAll(primaryKeys);
    scanVariables.add(new LogicalVariable(-1));
    for (int i = 0; i < numOfAdditionalNonFilteringFields; i++) {
        scanVariables.add(new LogicalVariable(-1));
    }
    IPhysicalPropertiesVector r = dataSourceIndex.getDataSource().getPropertiesProvider().computePropertiesVector(scanVariables);
    r.getLocalProperties().clear();
    IPhysicalPropertiesVector[] requirements = new IPhysicalPropertiesVector[1];
    requirements[0] = r;
    return new PhysicalRequirements(requirements, IPartitioningRequirementsCoordinator.NO_COORDINATION);
}
Also used : LogicalVariable(org.apache.hyracks.algebricks.core.algebra.base.LogicalVariable) ArrayList(java.util.ArrayList) IPhysicalPropertiesVector(org.apache.hyracks.algebricks.core.algebra.properties.IPhysicalPropertiesVector) AlgebricksPartitionConstraint(org.apache.hyracks.algebricks.common.constraints.AlgebricksPartitionConstraint) PhysicalRequirements(org.apache.hyracks.algebricks.core.algebra.properties.PhysicalRequirements)

Example 22 with IPhysicalPropertiesVector

use of org.apache.hyracks.algebricks.core.algebra.properties.IPhysicalPropertiesVector in project asterixdb by apache.

the class InMemoryHashJoinPOperator method deliveredLocalProperties.

@Override
protected List<ILocalStructuralProperty> deliveredLocalProperties(ILogicalOperator op, IOptimizationContext context) {
    AbstractLogicalOperator op0 = (AbstractLogicalOperator) op.getInputs().get(0).getValue();
    IPhysicalPropertiesVector pv0 = op0.getPhysicalOperator().getDeliveredProperties();
    List<ILocalStructuralProperty> lp0 = pv0.getLocalProperties();
    if (lp0 != null) {
        // maintains the local properties on the probe side
        return new LinkedList<ILocalStructuralProperty>(lp0);
    }
    return new LinkedList<ILocalStructuralProperty>();
}
Also used : AbstractLogicalOperator(org.apache.hyracks.algebricks.core.algebra.operators.logical.AbstractLogicalOperator) IPhysicalPropertiesVector(org.apache.hyracks.algebricks.core.algebra.properties.IPhysicalPropertiesVector) ILocalStructuralProperty(org.apache.hyracks.algebricks.core.algebra.properties.ILocalStructuralProperty) LinkedList(java.util.LinkedList)

Aggregations

IPhysicalPropertiesVector (org.apache.hyracks.algebricks.core.algebra.properties.IPhysicalPropertiesVector)22 ArrayList (java.util.ArrayList)14 StructuralPropertiesVector (org.apache.hyracks.algebricks.core.algebra.properties.StructuralPropertiesVector)13 AbstractLogicalOperator (org.apache.hyracks.algebricks.core.algebra.operators.logical.AbstractLogicalOperator)12 LogicalVariable (org.apache.hyracks.algebricks.core.algebra.base.LogicalVariable)11 ILocalStructuralProperty (org.apache.hyracks.algebricks.core.algebra.properties.ILocalStructuralProperty)11 IPartitioningProperty (org.apache.hyracks.algebricks.core.algebra.properties.IPartitioningProperty)8 ILogicalOperator (org.apache.hyracks.algebricks.core.algebra.base.ILogicalOperator)6 PhysicalRequirements (org.apache.hyracks.algebricks.core.algebra.properties.PhysicalRequirements)6 ListSet (org.apache.hyracks.algebricks.common.utils.ListSet)4 ILogicalPlan (org.apache.hyracks.algebricks.core.algebra.base.ILogicalPlan)4 GroupByOperator (org.apache.hyracks.algebricks.core.algebra.operators.logical.GroupByOperator)4 LocalOrderProperty (org.apache.hyracks.algebricks.core.algebra.properties.LocalOrderProperty)4 LinkedList (java.util.LinkedList)3 LocalGroupingProperty (org.apache.hyracks.algebricks.core.algebra.properties.LocalGroupingProperty)3 OrderColumn (org.apache.hyracks.algebricks.core.algebra.properties.OrderColumn)3 HashMap (java.util.HashMap)1 Mutable (org.apache.commons.lang3.mutable.Mutable)1 AlgebricksPartitionConstraint (org.apache.hyracks.algebricks.common.constraints.AlgebricksPartitionConstraint)1 NotImplementedException (org.apache.hyracks.algebricks.common.exceptions.NotImplementedException)1