Refactor ParsedColInfo to be more statement-neutral

I want to be able to have an ORDER BY clause on a DELETE statement.  In our planner we represent the list of things following ORDER BY as instances of ParsedColInfo.

On master this class in nested with ParsedSelectStmt, and in general is pretty SELECT-centric.  This branch un-nests the class, and attempts to provide a bit more encapsulation.  This class could use some more refactoring (proper constructor, make members private), but it's got lots of uses all over the planner and DDL compiler, so I didn't do all of this.  This is a little better at least.
OK.

*Paul Martel*, Software Engineer
*VoltDB, Inc.*
*E: *pmartel@voltdb.com
*voltdb.com* <http://www.voltdb.com/>
Follow VoltDB [image: twitter] <https://twitter.com/VoltDB> [image:
facebook] <https://www.facebook.com/VoltDB> [image: linkedin]
<https://www.linkedin.com/company/voltdb>

On Fri, Dec 12, 2014 at 3:55 PM, Christopher M. Wolff <
notifications@github.com> wrote:
>
> In src/frontend/org/voltdb/planner/ParsedColInfo.java
> <https://github.com/VoltDB/voltdb/pull/1885#discussion-diff-21772502>:
>
> > +    public boolean ascending = true;
> > +
> > +    /** This will true if this instance refers to a column in an GROUP BY clause*/
> > +    public boolean groupBy = false;
> > +
> > +    /** Sometimes the expression in the parsed column needs to be adjusted
> > +     * for its context.  This is the case for AVG aggregates in SELECT statements,
> > +     * which get transformed into SUM/COUNT.  This callback interface allows
> > +     * clients constructing instances of ParsedColInfo to transform the expression
> > +     * as needed. */
> > +    public interface ExpressionAdjuster {
> > +        AbstractExpression adjust(AbstractExpression expr);
> > +    }
> > +
> > +    /** Construct a ParsedColInfo from Volt XML. */
> > +    static public ParsedColInfo fromOrderByXml(AbstractParsedStmt parsedStmt, VoltXMLElement orderByXml) {
>
> Well, it's dead code in this branch right now. But in my local DELETE ...
> ORDER BY branch, I'm calling it. I'd like to leave it in, since it will be
> live soon.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/VoltDB/voltdb/pull/1885/files#r21772502>.
>