Package com.espertech.esper.epl.expression

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


        List<SubordPropHashKey> hashKeys = Collections.emptyList();
        CoercionDesc hashKeyCoercionTypes = null;
        List<SubordPropRangeKey> rangeKeys = Collections.emptyList();
        CoercionDesc rangeKeyCoercionTypes = null;
        ExprNode[] inKeywordSingleIdxKeys = null;
        ExprNode inKeywordMultiIdxKey = null;

        EventTableAndNamePair[] tables;
        if (joinDesc.getInKeywordSingleIndex() != null) {
            SubordPropInKeywordSingleIndex single = joinDesc.getInKeywordSingleIndex();
            SubordPropHashKey keyInfo = new SubordPropHashKey(new QueryGraphValueEntryHashKeyedExpr(single.getExpressions()[0], false), null, single.getCoercionType());
View Full Code Here


        }
    }

    private static GroupByClauseElement walkChoice(EsperEPL2GrammarParser.GroupByListChoiceContext choice, Map<Tree, ExprNode> astExprNodeMap) {
        if (choice.e1 != null) {
            ExprNode expr = ASTExprHelper.exprCollectSubNodes(choice.e1, 0, astExprNodeMap).get(0);
            return new GroupByClauseElementExpr(expr);
        }
        if (choice.groupByCubeOrRollup() != null) {
            return walkCubeOrRollup(choice.groupByCubeOrRollup(), astExprNodeMap);
        }
View Full Code Here

        return elements;
    }

    private static GroupByClauseElement walkCombinable(EsperEPL2GrammarParser.GroupByCombinableExprContext ctx, Map<Tree, ExprNode> astExprNodeMap) {
        if (ctx.e1 != null && ctx.LPAREN() == null) {
            ExprNode expr = ASTExprHelper.exprCollectSubNodes(ctx.e1, 0, astExprNodeMap).get(0);
            return new GroupByClauseElementExpr(expr);
        }
        List<ExprNode> combined = ASTExprHelper.exprCollectSubNodes(ctx, 0, astExprNodeMap);
        return new GroupByClauseElementCombinedExpr(combined);
    }
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

        // categorized
        if (ctx.createContextGroupItem() != null){
            List<EsperEPL2GrammarParser.CreateContextGroupItemContext> grps = ctx.createContextGroupItem();
            List<ContextDetailCategoryItem> items = new ArrayList<ContextDetailCategoryItem>();
            for (EsperEPL2GrammarParser.CreateContextGroupItemContext grp : grps) {
                ExprNode exprNode = ASTExprHelper.exprCollectSubNodes(grp, 0, astExprNodeMap).get(0);
                String name = grp.i.getText();
                items.add(new ContextDetailCategoryItem(exprNode, name));
            }
            filterSpec = ASTFilterSpecHelper.walkFilterSpec(ctx.eventFilterExpression(), propertyEvalSpec, astExprNodeMap);
            return new ContextDetailCategory(items, filterSpec);
View Full Code Here

        List<ExprNode> distinctGroupByExpressions = new ArrayList<ExprNode>();
        Map<ExprNode, Integer> expressionToIndex = new HashMap<ExprNode, Integer>();
        for (ExprNode exprNode : groupByExpressionInfo.getExpressions()) {
            boolean found = false;
            for (int i = 0; i < distinctGroupByExpressions.size(); i++) {
                ExprNode other = distinctGroupByExpressions.get(i);
                // find same expression
                if (ExprNodeUtility.deepEquals(exprNode, other)) {
                    expressionToIndex.put(exprNode, i);
                    found = true;
                    break;
View Full Code Here

        }
    }

    private static ExprNode copyVisitExpression(ExprNode expression, ExprNodeSubselectDeclaredDotVisitor visitor) {
        try {
            ExprNode node = (ExprNode) SerializableObjectCopier.copy(expression);
            node.accept(visitor);
            return node;
        } catch (Exception e) {
            throw new RuntimeException("Internal error providing expression tree: " + e.getMessage(), e);
        }
    }
View Full Code Here

        List<ExprNode> parameters = new ArrayList<ExprNode>();
        int exprNum = start;
        while (exprNum < parent.getChildCount()) {
            if (parent.getChild(exprNum).getType() == EsperEPL2Ast.GOES) {
                ExprLambdaGoesNode goes = getLambdaGoes(parent.getChild(exprNum));
                ExprNode lambdaExpr = astExprNodeMap.remove(parent.getChild(++exprNum));
                goes.addChildNode(lambdaExpr);
                parameters.add(goes);
            }
            else {
                ExprNode parameter = astExprNodeMap.remove(parent.getChild(exprNum));
                if (parameter != null) {
                    parameters.add(parameter);
                }
            }
            exprNum++;
View Full Code Here

        // categorized
        else if (detailParent.getType() == EsperEPL2Ast.CREATE_CTX_CAT){
            List<ContextDetailCategoryItem> items = new ArrayList<ContextDetailCategoryItem>();
            for (int i = 0; i < detailParent.getChildCount() -1; i++) {
                Tree categoryParent = detailParent.getChild(i);
                ExprNode exprNode = astExprNodeMap.remove(categoryParent.getChild(0));
                String name = categoryParent.getChild(1).getText();
                items.add(new ContextDetailCategoryItem(exprNode, name));
            }
            filterSpec = ASTExprHelper.walkFilterSpec(detailParent.getChild(detailParent.getChildCount() - 1), propertyEvalSpec, astExprNodeMap);
            contextDetail = new ContextDetailCategory(items, filterSpec);
View Full Code Here

                    optionalDialectNode != null ? optionalDialectNode.getChild(0).getText() : null);
            return new Pair<ExpressionDeclItem, ExpressionScriptProvided>(null, script);
        }

        Tree parentGoes = node.getChild(1);
        ExprNode inner = ASTExprHelper.getRemoveExpr(parentGoes.getChild(0), astExprNodeMap);

        List<String> parametersNames = Collections.emptyList();
        if (parentGoes.getChildCount() > 1) {
            if (parentGoes.getChild(1).getType() == EsperEPL2GrammarParser.GOES) {
                Tree paramParent = parentGoes.getChild(1);
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.