DteResultSet dRS = new DteResultSet( queryResults, this );
DteResultSet dRS = new DteResultSet( queryResults, this, context );
	public IResultSet execute( IBaseQueryDefinition query )	{		if ( query == null )			return null;		if ( query instanceof IQueryDefinition )		{			Scriptable scope = context.getScope( );			IPreparedQuery pQuery = (IPreparedQuery) queryMap.get( query );			assert ( pQuery != null );			if ( pQuery != null )			{				try				{					IQueryResults queryResults = getParentQR( );					if ( queryResults == null )					{						queryResults = pQuery.execute( scope );					}					else					{						queryResults = pQuery.execute( queryResults, scope );					}					IResultIterator ri = queryResults.getResultIterator( );					assert ri != null;					DteResultSet dRS = new DteResultSet( queryResults, this );					rsStack.addLast( dRS );					return dRS;				}				catch ( BirtException e )				{					logger.log( Level.SEVERE, e.getMessage( ), e );					return null;				}			}		}		else if ( query instanceof ISubqueryDefinition )		{			assert ( rsStack.getLast( ) instanceof DteResultSet );			try			{				IResultIterator ri = ( (DteResultSet) rsStack.getLast( ) )						.getRs( ).getSecondaryIterator(								( (ISubqueryDefinition) query ).getName( ),								context.getScope( ) );				assert ri != null;				DteResultSet dRS = new DteResultSet( ri, this );				rsStack.addLast( dRS );				return dRS;			}			catch ( BirtException e )			{				logger.log( Level.SEVERE, e.getMessage( ), e );				return null;			}		}		assert ( false );		return null;	}