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/QueryExecutor.java
List groups = this.baseQueryDefn.getGroups();
			if ( groups != null && ! groups.isEmpty() )
			{
				IQuery.GroupSpec[] groupSpecs = new IQuery.GroupSpec[ groups.size() ];
				Iterator it = groups.iterator();
				for ( int i = 0; it.hasNext(); i++ )
				{
					IGroupDefinition src = (IGroupDefinition) it.next();
					
					if( (src.getKeyColumn( ) == null || src.getKeyColumn( ).trim( ).length( ) == 0)&&
						(src.getKeyExpression( ) == null || src.getKeyExpression( ).trim( ).length( ) == 0)	)
						throw new DataException( ResourceConstants.BAD_GROUP_EXPRESSION );
					
					String expr = src.getKeyColumn();
					if( expr == null )
					{
						expr = src.getKeyExpression();
					}else
					{
						expr = getColumnRefExpression(expr);
					}
					String groupName = "";
					if( expr.trim().equalsIgnoreCase("row[0]")
						|| expr.trim().equalsIgnoreCase("row._rowPosition")
						|| expr.trim().equalsIgnoreCase("dataSetRow[0]")
						|| expr.trim().equalsIgnoreCase("dataSetRow._rowPosition"))
					{
						groupName = "_{$TEMP_GROUP_" + i + "ROWID$}_";
					}else
					{