Package com.espertech.esper.epl.expression

Examples of com.espertech.esper.epl.expression.ExprNode


        for (int i = 0; i < getChildNodes().size() - 1; i++) {
            if (optionalMaxExpressions.size() <= i) {
                continue;
            }
            ExprNode optionalMaxExpression = optionalMaxExpressions.get(i);
            if (optionalMaxExpression == null) {
                continue;
            }
            if (optionalMaxExpression.isConstantResult()) {
                Number result = (Number) optionalMaxExpression.getExprEvaluator().evaluate(null, true, null);
                if (result != null) {
                    cachedMaxPerChild[i] = result.intValue();
                }
            }
            else {
View Full Code Here


        }
    }

    public Expression compileExpressionToSODA(String expression) throws EPException
    {
        ExprNode node = compileExpression(expression);
        return StatementSpecMapper.unmap(node);
    }
View Full Code Here

        // Compare object parameter by object parameter
        int index = 0;
        for (ExprNode thisParam : objectParameters)
        {
            ExprNode otherParam = other.objectParameters.get(index);
            index++;

            if (!ExprNodeUtility.deepEquals(thisParam, otherParam))
            {
                return false;
View Full Code Here

        // Compare object parameter by object parameter
        int index = 0;
        for (ExprNode thisParam : objectParameters)
        {
            ExprNode otherParam = other.objectParameters.get(index);
            index++;

            if (!ExprNodeUtility.deepEquals(thisParam, otherParam))
            {
                return false;
View Full Code Here

        }

        EventType eventType = prepareContext.getInputPorts().get(0).getTypeDesc().getEventType();
        singleOutputPort = prepareContext.getOutputPorts().size() == 1;

        ExprNode validated = ExprNodeUtility.validateSimpleGetSubtree("filter", filter, prepareContext.getStatementContext(), eventType);
        evaluator = validated.getExprEvaluator();
        theEvent = prepareContext.getServicesContext().getEventAdapterService().getShellForType(eventType);
        eventsPerStream[0] = theEvent;

        GraphTypeDesc[] typesPerPort = new GraphTypeDesc[prepareContext.getOutputPorts().size()];
        for (int i = 0; i < typesPerPort.length; i++) {
View Full Code Here

     * @param astExprNodeMap map to remove node from
     * @return expression
     */
    public static ExprNode getRemoveExpr(Tree child, Map<Tree, ExprNode> astExprNodeMap)
    {
        ExprNode thisEvalNode = astExprNodeMap.get(child);
        astExprNodeMap.remove(child);
        return thisEvalNode;
    }
View Full Code Here

        List<ExprNode> exprNodes = new LinkedList<ExprNode>();

        for (int i = startIndex; i < parentNode.getChildCount(); i++)
        {
          Tree currentNode = parentNode.getChild(i);
            ExprNode exprNode = astExprNodeMap.get(currentNode);
            if (exprNode == null)
            {
                throw new IllegalStateException("Expression node for AST node not found for type " + currentNode.getType() + " and text " + currentNode.getText());
            }
            exprNodes.add(exprNode);
View Full Code Here

        return exprNodes;
    }

    public static ExprTimePeriod getTimePeriodExpr(Tree node, Map<Tree, ExprNode> astExprNodeMap) {

        ExprNode nodes[] = new ExprNode[8];
        for (int i = 0; i < node.getChildCount(); i++)
        {
            Tree child = node.getChild(i);
            if (child.getType() == EsperEPL2Ast.MILLISECOND_PART)
            {
View Full Code Here

     * @param astExprNodeMap map to remove node from
     * @return expression
     */
    public static ExprNode getRemoveExpr(Tree child, Map<Tree, ExprNode> astExprNodeMap)
    {
        ExprNode thisEvalNode = astExprNodeMap.get(child);
        astExprNodeMap.remove(child);
        return thisEvalNode;
    }
View Full Code Here

     * @param astExprNodeMap map to remove node from
     * @return expression
     */
    public static ExprNode getRemoveExpr(Tree child, Map<Tree, ExprNode> astExprNodeMap)
    {
        ExprNode thisEvalNode = astExprNodeMap.get(child);
        astExprNodeMap.remove(child);
        return thisEvalNode;
    }
View Full Code Here

TOP

Related Classes of com.espertech.esper.epl.expression.ExprNode

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.