private static AbstractExpression buildPartialIndexPredicate(
            AbstractParsedStmt dummy, String indexName,
            VoltXMLElement predicateXML, Table table,
            VoltCompiler compiler) throws VoltCompilerException {
        // Make sure all column expressions refer to the same index table
        // before we can parse the XML to avoid the AbstractParsedStmt
        // exception/assertion
        String tableName = table.getTypeName();
        assert(tableName != null);
        StringBuffer msg = new StringBuffer("Partial index \"" + indexName + "\" ");

        // Make sure all column expressions refer the index table
        List<VoltXMLElement> columnRefs= predicateXML.findChildrenRecursively("columnref");
        for (VoltXMLElement columnRef : columnRefs) {
            String columnRefTableName = columnRef.attributes.get("table");
            if (columnRefTableName != null && !tableName.equals(columnRefTableName)) {
                msg.append("with expression(s) involving other tables is not supported.");
                throw compiler.new VoltCompilerException(msg.toString());
            }
        }
        // Now it safe to parse the expression tree
        AbstractExpression predicate = dummy.parseExpressionTree(predicateXML);
        if ( ! predicate.isValidExprForIndexesAndMVs(msg, false) ) {
            throw compiler.new VoltCompilerException(msg.toString());
        }
        return predicate;
    }
private static AbstractExpression buildPartialIndexPredicate ( AbstractParsedStmt dummy , String indexName , VoltXMLElement predicateXML , Table table , VoltCompiler compiler ) throws VoltCompilerException { String tableName = table . getTypeName ( ) ; assert ( tableName != null ) ; StringBuffer msg = new StringBuffer ( "Partial index \"" + indexName + "\" " ) ; List < VoltXMLElement > columnRefs = predicateXML . findChildrenRecursively ( "columnref" ) ; for ( VoltXMLElement columnRef : columnRefs ) { String columnRefTableName = columnRef . attributes . get ( "table" ) ; if ( columnRefTableName != null && ! tableName . equals ( columnRefTableName ) ) { msg . append ( "with expression(s) involving other tables is not supported." ) ; throw compiler . new VoltCompilerException ( msg . toString ( ) ) ; } } AbstractExpression predicate = dummy . parseExpressionTree ( predicateXML ) ; if ( ! predicate . isValidExprForIndexesAndMVs ( msg , false ) ) { throw compiler . new VoltCompilerException ( msg . toString ( ) ) ; } return predicate ; }
Build the abstract expression representing the partial index predicate.
Verify it satisfies the rules. Throw error messages otherwise.

@param dummy AbstractParsedStmt
@param indexName The name of the index being checked.
@param predicateXML The XML representing the predicate.
@param table Table
@throws VoltCompilerException
@return AbstractExpression