private void resolveColumnReferences ( ) { if ( isDistinctSelect || isGrouped ) { acceptsSequences = false ; } for ( int i = 0 ; i < rangeVariables . length ; i ++ ) { Expression e = rangeVariables [ i ] . nonIndexJoinCondition ; if ( e == null ) { continue ; } resolveColumnReferencesAndAllocate ( e , i + 1 , false ) ; } resolveColumnReferencesAndAllocate ( queryCondition , rangeVariables . length , false ) ; for ( int i = 0 ; i < indexLimitVisible ; i ++ ) { resolveColumnReferencesAndAllocate ( exprColumns [ i ] , rangeVariables . length , acceptsSequences ) ; } for ( int i = indexLimitVisible ; i < indexStartOrderBy ; i ++ ) { resolveColumnReferencesAndAllocate ( exprColumns [ i ] , rangeVariables . length , false ) ; } /************************* Volt DB Extensions *************************/ resolveColumnReferencesInGroupBy ( ) ; /**********************************************************************/ resolveColumnReferencesInOrderBy ( sortAndSlice ) ; }
Resolves all column expressions in the GROUP BY clause and beyond . Replaces any alias column expression in the ORDER BY cluase with the actual select column expression .