Examples of AbstractExpression


Examples of org.voltdb.expressions.AbstractExpression

    private void populateProjectionPlanNode(AbstractPlanNode parent, ProjectionPlanNode proj_node, Collection<PlanColumn> output_columns) {
        if (debug.val)
            LOG.debug(String.format("Populating %s with %d output PlanColumns", proj_node, output_columns.size()));

        AbstractExpression orig_col_exp = null;
        for (PlanColumn plan_col : output_columns) {
            int orig_guid = -1;
            for (Integer guid : parent.getOutputColumnGUIDs()) {
                PlanColumn output_plan_column = state.plannerContext.get(guid);
                if (plan_col.equals(output_plan_column, true, true)) {
                    orig_col_exp = output_plan_column.getExpression();
                    orig_guid = guid;
                    break;
                }
            }
            if (orig_guid == -1) {
                LOG.warn(String.format("Failed to find PlanColumn %s in %s output columns?", plan_col, parent));
            } else {
                assert (orig_col_exp != null);
                AbstractExpression new_col_exp = null;
                try {
                    new_col_exp = (AbstractExpression) orig_col_exp.clone();
                } catch (CloneNotSupportedException ex) {
                    throw new RuntimeException(ex);
                }
View Full Code Here

Examples of org.voltdb.expressions.AbstractExpression

                    for (int i = 0, cnt = catalog_tbl.getColumns().size(); i < cnt; i++) {
                        int col_guid = proj_node.getOutputColumnGUID(i);
                        PlanColumn plan_col = state.plannerContext.get(col_guid);
                        assert (plan_col != null);

                        AbstractExpression col_exp = plan_col.getExpression();
                        assert (col_exp != null);
                        if ((col_exp instanceof TupleValueExpression) == false) {
                            if (debug.val)
                                LOG.debug("SKIP - Inline " + proj_node + " does not have a TupleValueExpression for output column #" + i);
                            return;
View Full Code Here

Examples of org.voltdb.expressions.AbstractExpression

            AbstractPlanNode root_node = PlanNodeUtil.getRootPlanNodeForStatement(catalog_stmt, true);

            try {
                // WHERE Clause
                if (catalog_stmt.getExptree() != null && !catalog_stmt.getExptree().isEmpty()) {
                    AbstractExpression root_exp = ExpressionUtil.deserializeExpression(catalog_db, catalog_stmt.getExptree());
                    CatalogUtil.extractExpressionPredicates(catalog_stmt,
                                                           catalog_db,
                                                           cset,
                                                           root_exp,
                                                           convert_params,
View Full Code Here

Examples of org.voltdb.expressions.AbstractExpression

                // We should find the Materialize node before the Insert
                if (node instanceof MaterializePlanNode) {
                    for (Integer column_guid : node.getOutputColumnGUIDs()) {
                        PlanColumn column = PlannerContext.singleton().get(column_guid);
                        assert (column != null);
                        AbstractExpression exp = column.getExpression();

                        // Now extract the CatalogType objects that are being
                        // referenced by this materialization column
                        final List<CatalogType> catalog_refs = new ArrayList<CatalogType>();
                        new ExpressionTreeWalker() {
                            @Override
                            protected void callback(AbstractExpression exp) {
                                if (!(exp instanceof AbstractValueExpression))
                                    return;
                                CatalogType element = null;
                                switch (exp.getExpressionType()) {
                                    case VALUE_PARAMETER: {
                                        int param_idx = ((ParameterValueExpression) exp).getParameterId();
                                        element = catalog_stmt.getParameters().get(param_idx);
                                        if (element == null) {
                                            LOG.warn("ERROR: Unable to find Parameter object in catalog [" + ((ParameterValueExpression) exp).getParameterId() + "]");
                                            this.stop();
                                        }
                                        // We want to use the ProcParameter instead of the StmtParameter
                                        // It's not an error if the StmtParameter is not mapped to a
                                        // ProcParameter
                                        if (convert_params && ((StmtParameter) element).getProcparameter() != null) {
                                            LOG.debug(element + "(" + element + ") --> ProcParameter[" + element.getField("procparameter") + "]");
                                            element = ((StmtParameter) element).getProcparameter();
                                        }
                                        break;
                                    }
                                    case VALUE_TUPLE_ADDRESS:
                                    case VALUE_TUPLE: {
                                        // This shouldn't happen, but it is nice
                                        // to be told if it does...
                                        LOG.warn("Unexpected " + exp.getClass().getSimpleName() + " node when examining " + node.getClass().getSimpleName() + " for " + catalog_stmt);
                                        break;
                                    }
                                    default: {
                                        // Do nothing...
                                    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.