Search in sources :

Example 6 with LogicalOperatorDeepCopyWithNewVariablesVisitor

use of org.apache.hyracks.algebricks.core.algebra.operators.logical.visitors.LogicalOperatorDeepCopyWithNewVariablesVisitor in project asterixdb by apache.

the class ReplaceNtsWithSubplanInputOperatorVisitor method visitNestedTupleSourceOperator.

@Override
public ILogicalOperator visitNestedTupleSourceOperator(NestedTupleSourceOperator op, Void arg) throws AlgebricksException {
    if (!isOriginalCopyUsed) {
        isOriginalCopyUsed = true;
        return subplanInputOperator;
    }
    LogicalOperatorDeepCopyWithNewVariablesVisitor visitor = new LogicalOperatorDeepCopyWithNewVariablesVisitor(ctx, ctx);
    ILogicalOperator copiedSubplanInputOperator = visitor.deepCopy(subplanInputOperator);
    varMap.putAll(visitor.getInputToOutputVariableMapping());
    return copiedSubplanInputOperator;
}
Also used : LogicalOperatorDeepCopyWithNewVariablesVisitor(org.apache.hyracks.algebricks.core.algebra.operators.logical.visitors.LogicalOperatorDeepCopyWithNewVariablesVisitor) ILogicalOperator(org.apache.hyracks.algebricks.core.algebra.base.ILogicalOperator)

Aggregations

ILogicalOperator (org.apache.hyracks.algebricks.core.algebra.base.ILogicalOperator)6 LogicalOperatorDeepCopyWithNewVariablesVisitor (org.apache.hyracks.algebricks.core.algebra.operators.logical.visitors.LogicalOperatorDeepCopyWithNewVariablesVisitor)6 LogicalVariable (org.apache.hyracks.algebricks.core.algebra.base.LogicalVariable)5 LinkedHashMap (java.util.LinkedHashMap)4 Map (java.util.Map)4 HashMap (java.util.HashMap)3 MutableObject (org.apache.commons.lang3.mutable.MutableObject)3 AbstractLogicalOperator (org.apache.hyracks.algebricks.core.algebra.operators.logical.AbstractLogicalOperator)3 ArrayList (java.util.ArrayList)2 HashSet (java.util.HashSet)2 IAType (org.apache.asterix.om.types.IAType)2 Mutable (org.apache.commons.lang3.mutable.Mutable)2 AlgebricksException (org.apache.hyracks.algebricks.common.exceptions.AlgebricksException)2 ILogicalPlan (org.apache.hyracks.algebricks.core.algebra.base.ILogicalPlan)2 AbstractBinaryJoinOperator (org.apache.hyracks.algebricks.core.algebra.operators.logical.AbstractBinaryJoinOperator)2 StringReader (java.io.StringReader)1 Set (java.util.Set)1 AQLPlusParser (org.apache.asterix.aqlplus.parser.AQLPlusParser)1 ParseException (org.apache.asterix.aqlplus.parser.ParseException)1 AsterixException (org.apache.asterix.common.exceptions.AsterixException)1