use of org.apache.hyracks.algebricks.core.algebra.operators.logical.WriteResultOperator in project asterixdb by apache.
the class WriteResultPOperator method contributeRuntimeOperator.
@SuppressWarnings({ "rawtypes", "unchecked" })
@Override
public void contributeRuntimeOperator(IHyracksJobBuilder builder, JobGenContext context, ILogicalOperator op, IOperatorSchema propagatedSchema, IOperatorSchema[] inputSchemas, IOperatorSchema outerPlanSchema) throws AlgebricksException {
WriteResultOperator writeResultOp = (WriteResultOperator) op;
IMetadataProvider mp = context.getMetadataProvider();
JobSpecification spec = builder.getJobSpec();
Pair<IOperatorDescriptor, AlgebricksPartitionConstraint> runtimeAndConstraints = mp.getWriteResultRuntime(dataSource, propagatedSchema, keys, payload, additionalFilteringKeys, context, spec);
builder.contributeHyracksOperator(writeResultOp, runtimeAndConstraints.first);
builder.contributeAlgebricksPartitionConstraint(runtimeAndConstraints.first, runtimeAndConstraints.second);
ILogicalOperator src = writeResultOp.getInputs().get(0).getValue();
builder.contributeGraphEdge(src, 0, writeResultOp, 0);
}
use of org.apache.hyracks.algebricks.core.algebra.operators.logical.WriteResultOperator in project asterixdb by apache.
the class IsomorphismOperatorVisitor method visitWriteResultOperator.
@Override
public Boolean visitWriteResultOperator(WriteResultOperator op, ILogicalOperator arg) throws AlgebricksException {
AbstractLogicalOperator aop = (AbstractLogicalOperator) arg;
if (aop.getOperatorTag() != LogicalOperatorTag.WRITE_RESULT) {
return Boolean.FALSE;
}
WriteResultOperator writeOpArg = (WriteResultOperator) copyAndSubstituteVar(op, arg);
boolean isomorphic = VariableUtilities.varListEqualUnordered(op.getSchema(), writeOpArg.getSchema());
if (!op.getDataSource().equals(writeOpArg.getDataSource())) {
isomorphic = false;
}
if (!op.getPayloadExpression().equals(writeOpArg.getPayloadExpression())) {
isomorphic = false;
}
return isomorphic;
}
use of org.apache.hyracks.algebricks.core.algebra.operators.logical.WriteResultOperator in project asterixdb by apache.
the class OperatorDeepCopyVisitor method visitWriteResultOperator.
@Override
public ILogicalOperator visitWriteResultOperator(WriteResultOperator op, Void arg) throws AlgebricksException {
ArrayList<Mutable<ILogicalExpression>> newKeyExpressions = new ArrayList<>();
deepCopyExpressionRefs(newKeyExpressions, op.getKeyExpressions());
List<Mutable<ILogicalExpression>> newLSMComponentFilterExpressions = new ArrayList<>();
deepCopyExpressionRefs(newKeyExpressions, op.getAdditionalFilteringExpressions());
WriteResultOperator writeResultOp = new WriteResultOperator(op.getDataSource(), deepCopyExpressionRef(op.getPayloadExpression()), newKeyExpressions);
writeResultOp.setAdditionalFilteringExpressions(newLSMComponentFilterExpressions);
return writeResultOp;
}
Aggregations