PreparedSubquery pq = new PreparedSubquery( this.dataEngineContext, this.sharedScope,
PreparedSubquery pq = new PreparedSubquery( this.session, this.dataEngineContext,
	private void prepareGroup( IBaseQueryDefinition baseQuery, int groupLevel,			Context cx ) throws DataException	{		IBaseTransform trans = baseQuery;		String groupName = IBaseExpression.GROUP_OVERALL;					// Group 0		if ( groupLevel != 0 )		{				IGroupDefinition igd = (IGroupDefinition) ( (IBaseQueryDefinition) trans ).getGroups( )					.get( groupLevel - 1 );			trans = igd;			groupName = igd.getName();		}						Collection exprCol = new ArrayList( );		Map resultSetExpressions = new HashMap();				//The latest column binding (AggregateOn introduced) 		Map map = baseQuery.getResultSetExpressions();		if (map != null) 		{			Iterator it = map.keySet().iterator();			while (it.hasNext()) {				Object key = it.next();				IBaseExpression icbe = (IBaseExpression)map.get(key);				if( icbe.getGroupName().equals(groupName))				{					exprCol.add( icbe );					resultSetExpressions.put(key, icbe);				}			}		}		prepareExpressions(exprCol, groupLevel, false, true, cx);				String key = null;		if( trans instanceof IGroupDefinition )		{			IGroupDefinition gd = (IGroupDefinition)trans;			key = gd.getKeyColumn( ) != null ? gd.getKeyColumn( ):gd.getKeyExpression( );		}		this.exprManager.addBindingExpr( key, resultSetExpressions, groupLevel );				// Prepare subqueries appearing in this group		Collection subQueries = trans.getSubqueries( );		Iterator subIt = subQueries.iterator( );		while ( subIt.hasNext( ) )		{			ISubqueryDefinition subquery = (ISubqueryDefinition) subIt.next( );			PreparedSubquery pq = new PreparedSubquery( this.dataEngineContext,					this.sharedScope,					subquery,					queryService,					groupLevel );			subQueryMap.put( subquery.getName(), pq);						subQueryDefnMap.put( subquery.getName( ), new Object[]{					subquery, new Integer( groupLevel )			} );		}	}