Package org.voltdb.planner

Examples of org.voltdb.planner.AbstractParsedStmt$TablePair


        PrintStream xmlDebugOut = BuildDirectoryUtils.getDebugOutputPrintStream("statement-hsql-xml", stmtName + ".xml");
        xmlDebugOut.println(xmlSQL);
        xmlDebugOut.close();

        // get a parsed statement from the xml
        AbstractParsedStmt parsedStmt = AbstractParsedStmt.parse(stmtSQL, xmlSQL, m_db);
        // output a description of the parsed stmt
        PrintStream parsedDebugOut = BuildDirectoryUtils.getDebugOutputPrintStream("statement-hsql-parsed", stmtName + ".txt");
        parsedDebugOut.println(parsedStmt.toString());
        parsedDebugOut.close();

        int clausesFound = 0;
        clausesFound += parsedStmt.noTableSelectionList.size();
        for (Entry<Table, ArrayList<AbstractExpression>> pair : parsedStmt.tableFilterList.entrySet())
            clausesFound += pair.getValue().size();
        for (Entry<AbstractParsedStmt.TablePair, ArrayList<AbstractExpression>> pair : parsedStmt.joinSelectionList.entrySet())
            clausesFound += pair.getValue().size();
        clausesFound += parsedStmt.multiTableSelectionList.size();

        System.out.println(parsedStmt.toString());

        assertEquals(clausesFound, parsedStmt.whereSelectionList.size());
    }
View Full Code Here


        String name = node.attributes.get("name");
        boolean unique = Boolean.parseBoolean(node.attributes.get("unique"));
        boolean assumeUnique = Boolean.parseBoolean(node.attributes.get("assumeunique"));

        AbstractParsedStmt dummy = new ParsedSelectStmt(null, db);
        dummy.setTable(table);

        // "parse" the expression trees for an expression-based index (vs. a simple column value index)
        List<AbstractExpression> exprs = null;
        for (VoltXMLElement subNode : node.children) {
            if (subNode.name.equals("exprs")) {
                exprs = new ArrayList<AbstractExpression>();
                for (VoltXMLElement exprNode : subNode.children) {
                    AbstractExpression expr = dummy.parseExpressionTree(exprNode);

                    if (containsTimeSensitiveFunction(expr, FunctionSQL.voltGetCurrentTimestampId()) ) {
                        String msg = String.format("Index %s cannot include the function NOW or CURRENT_TIMESTAMP.", name);
                        throw this.m_compiler.new VoltCompilerException(msg);
                    }
View Full Code Here

TOP

Related Classes of org.voltdb.planner.AbstractParsedStmt$TablePair

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.