List of usage examples for org.apache.commons.lang3.mutable Mutable getValue
T getValue();
From source file:org.apache.hyracks.algebricks.core.algebra.operators.logical.visitors.ProducedVariableVisitor.java
@Override public Void visitSubplanOperator(SubplanOperator op, Void arg) throws AlgebricksException { Set<LogicalVariable> producedVars = new HashSet<>(); Set<LogicalVariable> liveVars = new HashSet<>(); for (ILogicalPlan p : op.getNestedPlans()) { for (Mutable<ILogicalOperator> r : p.getRoots()) { VariableUtilities.getProducedVariablesInDescendantsAndSelf(r.getValue(), producedVars); VariableUtilities.getSubplanLocalLiveVariables(r.getValue(), liveVars); }//from www . java2 s . co m } producedVars.retainAll(liveVars); producedVariables.addAll(producedVars); return null; }
From source file:org.apache.hyracks.algebricks.core.algebra.operators.logical.visitors.SchemaVariableVisitor.java
@Override public Void visitSubplanOperator(SubplanOperator op, Void arg) throws AlgebricksException { for (Mutable<ILogicalOperator> c : op.getInputs()) { VariableUtilities.getLiveVariables(c.getValue(), schemaVariables); }/*from w w w . jav a2 s.c om*/ for (ILogicalPlan p : op.getNestedPlans()) { for (Mutable<ILogicalOperator> r : p.getRoots()) { VariableUtilities.getLiveVariables(r.getValue(), schemaVariables); } } return null; }
From source file:org.apache.hyracks.algebricks.core.algebra.operators.logical.visitors.SchemaVariableVisitor.java
@Override public Void visitInsertDeleteUpsertOperator(InsertDeleteUpsertOperator op, Void arg) throws AlgebricksException { // produced first VariableUtilities.getProducedVariables(op, schemaVariables); // then propagated for (Mutable<ILogicalOperator> c : op.getInputs()) { VariableUtilities.getLiveVariables(c.getValue(), schemaVariables); }/* w w w.j a v a2 s. com*/ return null; }
From source file:org.apache.hyracks.algebricks.core.algebra.operators.logical.visitors.SubstituteVariableVisitor.java
@Override public Void visitGroupByOperator(GroupByOperator op, Pair<LogicalVariable, LogicalVariable> pair) throws AlgebricksException { subst(pair.first, pair.second, op.getGroupByList()); subst(pair.first, pair.second, op.getDecorList()); for (ILogicalPlan p : op.getNestedPlans()) { for (Mutable<ILogicalOperator> r : p.getRoots()) { VariableUtilities.substituteVariablesInDescendantsAndSelf(r.getValue(), pair.first, pair.second, ctx);/*from www. j ava 2 s . c o m*/ } } substVarTypes(op, pair); return null; }
From source file:org.apache.hyracks.algebricks.core.algebra.operators.logical.visitors.SubstituteVariableVisitor.java
@Override public Void visitSubplanOperator(SubplanOperator op, Pair<LogicalVariable, LogicalVariable> pair) throws AlgebricksException { for (ILogicalPlan p : op.getNestedPlans()) { for (Mutable<ILogicalOperator> r : p.getRoots()) { VariableUtilities.substituteVariablesInDescendantsAndSelf(r.getValue(), pair.first, pair.second, ctx);//w ww. j ava2 s.c om } } return null; }
From source file:org.apache.hyracks.algebricks.core.algebra.operators.logical.visitors.SubstituteVariableVisitor.java
@Override public Void visitInsertDeleteUpsertOperator(InsertDeleteUpsertOperator op, Pair<LogicalVariable, LogicalVariable> pair) throws AlgebricksException { op.getPayloadExpression().getValue().substituteVar(pair.first, pair.second); for (Mutable<ILogicalExpression> e : op.getPrimaryKeyExpressions()) { e.getValue().substituteVar(pair.first, pair.second); }/* www . j a v a 2s.co m*/ substVarTypes(op, pair); return null; }
From source file:org.apache.hyracks.algebricks.core.algebra.operators.logical.visitors.SubstituteVariableVisitor.java
@Override public Void visitIndexInsertDeleteUpsertOperator(IndexInsertDeleteUpsertOperator op, Pair<LogicalVariable, LogicalVariable> pair) throws AlgebricksException { for (Mutable<ILogicalExpression> e : op.getPrimaryKeyExpressions()) { e.getValue().substituteVar(pair.first, pair.second); }//ww w. ja v a2s.c o m for (Mutable<ILogicalExpression> e : op.getSecondaryKeyExpressions()) { e.getValue().substituteVar(pair.first, pair.second); } substVarTypes(op, pair); return null; }
From source file:org.apache.hyracks.algebricks.core.algebra.operators.logical.visitors.UsedVariableVisitor.java
private void getUsedVarsFromExprAndFilterExpr(AbstractUnnestMapOperator op) { op.getExpressionRef().getValue().getUsedVariables(usedVariables); if (op.getAdditionalFilteringExpressions() != null) { for (Mutable<ILogicalExpression> e : op.getAdditionalFilteringExpressions()) { e.getValue().getUsedVariables(usedVariables); }/*from ww w .j a va 2 s .c o m*/ } }
From source file:org.apache.hyracks.algebricks.core.algebra.operators.logical.visitors.UsedVariableVisitor.java
@Override public Void visitInsertDeleteUpsertOperator(InsertDeleteUpsertOperator op, Void arg) { // 1. The record variable op.getPayloadExpression().getValue().getUsedVariables(usedVariables); // 2. The primary key variables for (Mutable<ILogicalExpression> e : op.getPrimaryKeyExpressions()) { e.getValue().getUsedVariables(usedVariables); }// w ww.java 2 s. c o m // 3. The filters variables if (op.getAdditionalFilteringExpressions() != null) { for (Mutable<ILogicalExpression> e : op.getAdditionalFilteringExpressions()) { e.getValue().getUsedVariables(usedVariables); } } // 4. The Other variables (Not key, Not payload, and Not Filter) if (op.getAdditionalNonFilteringExpressions() != null) { for (Mutable<ILogicalExpression> e : op.getAdditionalNonFilteringExpressions()) { e.getValue().getUsedVariables(usedVariables); } } return null; }
From source file:org.apache.hyracks.algebricks.core.algebra.operators.logical.visitors.UsedVariableVisitor.java
@Override public Void visitIndexInsertDeleteUpsertOperator(IndexInsertDeleteUpsertOperator op, Void arg) { for (Mutable<ILogicalExpression> e : op.getPrimaryKeyExpressions()) { e.getValue().getUsedVariables(usedVariables); }/* w w w. j a v a 2s.c om*/ for (Mutable<ILogicalExpression> e : op.getSecondaryKeyExpressions()) { e.getValue().getUsedVariables(usedVariables); } if (op.getFilterExpression() != null) { op.getFilterExpression().getValue().getUsedVariables(usedVariables); } if (op.getAdditionalFilteringExpressions() != null) { for (Mutable<ILogicalExpression> e : op.getAdditionalFilteringExpressions()) { e.getValue().getUsedVariables(usedVariables); } } if (op.getPrevAdditionalFilteringExpression() != null) { op.getPrevAdditionalFilteringExpression().getValue().getUsedVariables(usedVariables); } if (op.getPrevSecondaryKeyExprs() != null) { for (Mutable<ILogicalExpression> e : op.getPrevSecondaryKeyExprs()) { e.getValue().getUsedVariables(usedVariables); } } return null; }