@Override public StatefulFunctionCallExpression cloneExpression() { cloneAnnotations(); List<Mutable<ILogicalExpression>> clonedArgs = cloneArguments(); StatefulFunctionCallExpression clonedExpr = new StatefulFunctionCallExpression(finfo, propertiesComputer, clonedArgs); clonedExpr.setSourceLocation(sourceLoc); return clonedExpr; }
@Override public ILogicalExpression visitStatefulFunctionCallExpression(StatefulFunctionCallExpression expr, Void arg) throws AlgebricksException { StatefulFunctionCallExpression exprCopy = new StatefulFunctionCallExpression(expr.getFunctionInfo(), expr.getPropertiesComputer(), deepCopyExpressionReferenceList(expr.getArguments())); deepCopyAnnotations(expr, exprCopy); deepCopyOpaqueParameters(expr, exprCopy); copySourceLocation(expr, exprCopy); return exprCopy; }
@Override public String visitStatefulFunctionCallExpression(StatefulFunctionCallExpression expr, Integer indent) throws AlgebricksException { return expr.toString(); }
rOpVars.add(p); ArrayList<Mutable<ILogicalExpression>> rOpExprList = new ArrayList<Mutable<ILogicalExpression>>(); StatefulFunctionCallExpression fce = new StatefulFunctionCallExpression( FunctionUtil.getFunctionInfo(BuiltinFunctions.TID), UnpartitionedPropertyComputer.INSTANCE); fce.setSourceLocation(op.getSourceLocation()); rOpExprList.add(new MutableObject<ILogicalExpression>(fce)); RunningAggregateOperator rOp = new RunningAggregateOperator(rOpVars, rOpExprList);
public static AbstractFunctionCallExpression makeWindowFunctionExpression(FunctionIdentifier winfi, List<Mutable<ILogicalExpression>> args) { IFunctionInfo finfo = getAsterixFunctionInfo(winfi); if (finfo == null) { throw new IllegalStateException("no implementation for window function " + finfo); } return new StatefulFunctionCallExpression(finfo, UnpartitionedPropertyComputer.INSTANCE, args); }
List<Mutable<ILogicalExpression>> raggExprs = new ArrayList<Mutable<ILogicalExpression>>(); raggVars.add(posVar); StatefulFunctionCallExpression fce = new StatefulFunctionCallExpression( FunctionUtil.getFunctionInfo(BuiltinFunctions.TID), UnpartitionedPropertyComputer.INSTANCE); fce.setSourceLocation(sourceLoc); raggExprs.add(new MutableObject<ILogicalExpression>(fce)); RunningAggregateOperator raggOp = new RunningAggregateOperator(raggVars, raggExprs);
LogicalVariable assignVar = context.newVar(); ILogicalOperator assignOp = new AssignOperator(assignVar, new MutableObject<ILogicalExpression>(new StatefulFunctionCallExpression( FunctionUtil.getFunctionInfo(BuiltinFunctions.CREATE_QUERY_UID), null))); OperatorPropertiesUtil.markMovable(assignOp, !usedForCorrelationJoin);
raggVars.add(posVar); List<Mutable<ILogicalExpression>> rAggExprs = new ArrayList<>(1); StatefulFunctionCallExpression tidFun = new StatefulFunctionCallExpression( FunctionUtil.getFunctionInfo(BuiltinFunctions.TID), UnpartitionedPropertyComputer.INSTANCE); tidFun.setSourceLocation(agg.getSourceLocation()); rAggExprs.add(new MutableObject<ILogicalExpression>(tidFun)); RunningAggregateOperator rAgg = new RunningAggregateOperator(raggVars, rAggExprs);