Search in sources :

Example 36 with SelectOperator

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

the class PushSelectIntoJoinRule method copySelectToBranch.

private static void copySelectToBranch(SelectOperator select, Mutable<ILogicalOperator> branch, IOptimizationContext context) throws AlgebricksException {
    ILogicalOperator newSelect = new SelectOperator(select.getCondition(), select.getRetainMissing(), select.getMissingPlaceholderVariable());
    Mutable<ILogicalOperator> newRef = new MutableObject<ILogicalOperator>(branch.getValue());
    newSelect.getInputs().add(newRef);
    branch.setValue(newSelect);
    context.computeAndSetTypeEnvironmentForOperator(newSelect);
}
Also used : SelectOperator(org.apache.hyracks.algebricks.core.algebra.operators.logical.SelectOperator) ILogicalOperator(org.apache.hyracks.algebricks.core.algebra.base.ILogicalOperator) MutableObject(org.apache.commons.lang3.mutable.MutableObject)

Aggregations

SelectOperator (org.apache.hyracks.algebricks.core.algebra.operators.logical.SelectOperator)36 ILogicalExpression (org.apache.hyracks.algebricks.core.algebra.base.ILogicalExpression)27 ILogicalOperator (org.apache.hyracks.algebricks.core.algebra.base.ILogicalOperator)23 AbstractLogicalOperator (org.apache.hyracks.algebricks.core.algebra.operators.logical.AbstractLogicalOperator)19 LogicalVariable (org.apache.hyracks.algebricks.core.algebra.base.LogicalVariable)17 Mutable (org.apache.commons.lang3.mutable.Mutable)15 MutableObject (org.apache.commons.lang3.mutable.MutableObject)11 ArrayList (java.util.ArrayList)10 ScalarFunctionCallExpression (org.apache.hyracks.algebricks.core.algebra.expressions.ScalarFunctionCallExpression)10 VariableReferenceExpression (org.apache.hyracks.algebricks.core.algebra.expressions.VariableReferenceExpression)10 AbstractBinaryJoinOperator (org.apache.hyracks.algebricks.core.algebra.operators.logical.AbstractBinaryJoinOperator)9 Pair (org.apache.hyracks.algebricks.common.utils.Pair)8 AssignOperator (org.apache.hyracks.algebricks.core.algebra.operators.logical.AssignOperator)7 HashSet (java.util.HashSet)6 AbstractFunctionCallExpression (org.apache.hyracks.algebricks.core.algebra.expressions.AbstractFunctionCallExpression)6 GbyVariableExpressionPair (org.apache.asterix.lang.common.expression.GbyVariableExpressionPair)5 ILogicalPlan (org.apache.hyracks.algebricks.core.algebra.base.ILogicalPlan)5 AggregateOperator (org.apache.hyracks.algebricks.core.algebra.operators.logical.AggregateOperator)5 NestedTupleSourceOperator (org.apache.hyracks.algebricks.core.algebra.operators.logical.NestedTupleSourceOperator)5 SubplanOperator (org.apache.hyracks.algebricks.core.algebra.operators.logical.SubplanOperator)5