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/executor/transform/group/GroupCalculationUtil.java
for ( int i = 0; i < groupSpecs.length; ++i )
			{
				int keyIndex = groupSpecs[i].getKeyIndex( );
				String keyColumn = groupSpecs[i].getKeyColumn( );
				if (resultPopoulator.getEventHandler() != null
						&& resultPopoulator.getEventHandler().isRowID(keyIndex,
								keyColumn)) {
					groupDefs[i] = GroupBy.newInstanceForRowID(groupSpecs[i]);
					continue;
				}
				
				
				if ( keyColumn != null )
					keyIndex = rsMeta.getFieldIndex( keyColumn );
				if ( keyIndex < 1 || keyIndex > rsMeta.getFieldCount( ) )
				{
					
					throw new DataException( ResourceConstants.INVALID_GROUP_KEY_COLUMN,
							keyColumn );
				}
				groupDefs[i] = GroupBy.newInstance( groupSpecs[i],
						keyIndex,
						keyColumn,
						rsMeta.getFieldValueClass( keyIndex ) );
			}
		}
		else
		{
			groupDefs = new GroupBy[0];
		}