Bug 182061 Data engine changes to support result set sharing
data/org.eclipse.birt.data/src/org/eclipse/birt/data/engine/impl/PreparedQuery.java
* if an aggregateOn field is set to an expression without aggregation, we should also make it inheritable by sub query
	 * for the expression actually involves no aggregations.
	 * 
	 * @param expr
	 * @return
	 */
	private ScriptExpression copyScriptExpr( IBaseExpression expr )
	{
		ScriptExpression se = new ScriptExpression( ( (IScriptExpression) expr ).getText( ),
				( (IScriptExpression) expr ).getDataType( ) );
		return se;
	}
	
	/**
	 * @param trans
	 * @param groupLevel
	 * @param cx
	 * @throws DataException
	 */
	private void prepareGroup( IBaseQueryDefinition baseQuery, int groupLevel,
			Context cx ) throws DataException
	{
		IBaseTransform trans = baseQuery;
		String groupName = IBaseExpression.GROUP_OVERALL;
			
		
		if ( groupLevel != 0 )
		{	
			IGroupDefinition igd = (IGroupDefinition) ( (IBaseQueryDefinition) trans ).getGroups( )
					.get( groupLevel - 1 );