private static List < Expression > getDisplayColumnsForSetOp ( QueryExpression queryExpr ) { assert ( queryExpr != null ) ; if ( queryExpr . getLeftQueryExpression ( ) == null ) { // end of recursion. This is a QuerySpecification assert ( queryExpr instanceof QuerySpecification ) ; QuerySpecification select = ( QuerySpecification ) queryExpr ; return select . displayCols ; } else { // recurse return getDisplayColumnsForSetOp ( queryExpr . getLeftQueryExpression ( ) ) ; } }
Return a list of the display columns for the left most statement from a set op