Search in sources :

Example 6 with RunningAggregateOperator

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

the class IsomorphismOperatorVisitor method visitRunningAggregateOperator.

@Override
public Boolean visitRunningAggregateOperator(RunningAggregateOperator op, ILogicalOperator arg) throws AlgebricksException {
    AbstractLogicalOperator aop = (AbstractLogicalOperator) arg;
    if (aop.getOperatorTag() != LogicalOperatorTag.RUNNINGAGGREGATE) {
        return Boolean.FALSE;
    }
    RunningAggregateOperator aggOpArg = (RunningAggregateOperator) copyAndSubstituteVar(op, arg);
    boolean isomorphic = VariableUtilities.varListEqualUnordered(getPairList(op.getVariables(), op.getExpressions()), getPairList(aggOpArg.getVariables(), aggOpArg.getExpressions()));
    return isomorphic;
}
Also used : AbstractLogicalOperator(org.apache.hyracks.algebricks.core.algebra.operators.logical.AbstractLogicalOperator) RunningAggregateOperator(org.apache.hyracks.algebricks.core.algebra.operators.logical.RunningAggregateOperator)

Aggregations

RunningAggregateOperator (org.apache.hyracks.algebricks.core.algebra.operators.logical.RunningAggregateOperator)6 Mutable (org.apache.commons.lang3.mutable.Mutable)4 ILogicalOperator (org.apache.hyracks.algebricks.core.algebra.base.ILogicalOperator)4 LogicalVariable (org.apache.hyracks.algebricks.core.algebra.base.LogicalVariable)4 StatefulFunctionCallExpression (org.apache.hyracks.algebricks.core.algebra.expressions.StatefulFunctionCallExpression)4 AbstractLogicalOperator (org.apache.hyracks.algebricks.core.algebra.operators.logical.AbstractLogicalOperator)4 ArrayList (java.util.ArrayList)3 ILogicalExpression (org.apache.hyracks.algebricks.core.algebra.base.ILogicalExpression)3 UnnestOperator (org.apache.hyracks.algebricks.core.algebra.operators.logical.UnnestOperator)3 AbstractFunctionCallExpression (org.apache.hyracks.algebricks.core.algebra.expressions.AbstractFunctionCallExpression)2 AbstractLogicalExpression (org.apache.hyracks.algebricks.core.algebra.expressions.AbstractLogicalExpression)2 VariableReferenceExpression (org.apache.hyracks.algebricks.core.algebra.expressions.VariableReferenceExpression)2 AggregateOperator (org.apache.hyracks.algebricks.core.algebra.operators.logical.AggregateOperator)2 AssignOperator (org.apache.hyracks.algebricks.core.algebra.operators.logical.AssignOperator)2 RunningAggregatePOperator (org.apache.hyracks.algebricks.core.algebra.operators.physical.RunningAggregatePOperator)2 IExpressionRuntimeProvider (org.apache.hyracks.algebricks.core.algebra.expressions.IExpressionRuntimeProvider)1 GroupByOperator (org.apache.hyracks.algebricks.core.algebra.operators.logical.GroupByOperator)1 IRunningAggregateEvaluatorFactory (org.apache.hyracks.algebricks.runtime.base.IRunningAggregateEvaluatorFactory)1 RunningAggregateRuntimeFactory (org.apache.hyracks.algebricks.runtime.operators.std.RunningAggregateRuntimeFactory)1 RecordDescriptor (org.apache.hyracks.api.dataflow.value.RecordDescriptor)1