Bug 131011 Support running query based on report document data
Data Engine should support running a query based on data set and expression data stored in a report document. This bugzilla entry serves as a repository for design docs and notes related to this feature.
data/org.eclipse.birt.data/src/org/eclipse/birt/data/engine/impl/ResultIterator.java
org.eclipse.birt.data.engine.odi.IResultIterator odiResult = resultIterator.getOdiResult( );
			
			List groups = queryDefn.getGroups( );
			if ( groupKeyValues.length > groups.size( ) )
				throw new DataException( ResourceConstants.INCORRECT_GROUP_KEY_VALUES );
			GroupDefinition group = null;
			String[] columnNames = new String[groupKeyValues.length];
			for ( int i = 0; i < columnNames.length; i++ )
			{
				group = (GroupDefinition) groups.get( i );
				columnNames[i] = getGroupKeyExpression( group );
			}
			
			odiResult.first( 0 );
			if ( odiResult.getCurrentResult( ) == null )
				return false;
			do
			{
				for ( int i = 0; i < columnNames.length; i++ )
				{
					if ( groupKeyValuesEqual( odiResult,
							groupKeyValues,
							columnNames,
							i ) )
					{
						if ( i == columnNames.length - 1 )
							return true;
					}
					else
					{