Search in sources :

Example 1 with IDataSink

use of org.apache.hyracks.algebricks.core.algebra.metadata.IDataSink in project asterixdb by apache.

the class SinkWritePOperator method getRequiredPropertiesForChildren.

@Override
public PhysicalRequirements getRequiredPropertiesForChildren(ILogicalOperator op, IPhysicalPropertiesVector reqdByParent, IOptimizationContext context) {
    WriteOperator write = (WriteOperator) op;
    IDataSink sink = write.getDataSink();
    IPartitioningProperty pp = sink.getPartitioningProperty();
    StructuralPropertiesVector[] r = new StructuralPropertiesVector[] { new StructuralPropertiesVector(pp, null) };
    return new PhysicalRequirements(r, IPartitioningRequirementsCoordinator.NO_COORDINATION);
}
Also used : StructuralPropertiesVector(org.apache.hyracks.algebricks.core.algebra.properties.StructuralPropertiesVector) IDataSink(org.apache.hyracks.algebricks.core.algebra.metadata.IDataSink) WriteOperator(org.apache.hyracks.algebricks.core.algebra.operators.logical.WriteOperator) IPartitioningProperty(org.apache.hyracks.algebricks.core.algebra.properties.IPartitioningProperty) PhysicalRequirements(org.apache.hyracks.algebricks.core.algebra.properties.PhysicalRequirements)

Example 2 with IDataSink

use of org.apache.hyracks.algebricks.core.algebra.metadata.IDataSink 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);
}
Also used : StructuralPropertiesVector(org.apache.hyracks.algebricks.core.algebra.properties.StructuralPropertiesVector) IDataSink(org.apache.hyracks.algebricks.core.algebra.metadata.IDataSink) IPartitioningProperty(org.apache.hyracks.algebricks.core.algebra.properties.IPartitioningProperty) PhysicalRequirements(org.apache.hyracks.algebricks.core.algebra.properties.PhysicalRequirements) DistributeResultOperator(org.apache.hyracks.algebricks.core.algebra.operators.logical.DistributeResultOperator)

Aggregations

IDataSink (org.apache.hyracks.algebricks.core.algebra.metadata.IDataSink)2 IPartitioningProperty (org.apache.hyracks.algebricks.core.algebra.properties.IPartitioningProperty)2 PhysicalRequirements (org.apache.hyracks.algebricks.core.algebra.properties.PhysicalRequirements)2 StructuralPropertiesVector (org.apache.hyracks.algebricks.core.algebra.properties.StructuralPropertiesVector)2 DistributeResultOperator (org.apache.hyracks.algebricks.core.algebra.operators.logical.DistributeResultOperator)1 WriteOperator (org.apache.hyracks.algebricks.core.algebra.operators.logical.WriteOperator)1