Bug 182061 Data engine changes to support result set sharing
data/org.eclipse.birt.data/src/org/eclipse/birt/data/engine/impl/PreparedQuery.java
for ( int i = 0; i < groups.size( ); i++ )
			{
				group = (IGroupDefinition) groups.get( i );
				if ( group.getName( ) == null
						|| group.getName( ).trim( ).length( ) == 0 )
					continue;
				for ( int j = 0; j < groups.size( ); j++ )
				{
					if ( group.getName( )
							.equals( ( (IGroupDefinition) groups.get( j ) ).getName( ) == null
									? ""
									: ( (IGroupDefinition) groups.get( j ) ).getName( ) )
							&& j != i )
						throw new DataException( ResourceConstants.DUPLICATE_GROUP_NAME );
				}
				groupNameSet.add( group.getName( ) );
			}
			
			Map map = baseQueryDefn.getResultSetExpressions( );
			if ( map != null )
			{
				Iterator it = map.keySet( ).iterator( );
				while ( it.hasNext( ) )
				{
					Object key = it.next( );
					IBaseExpression icbe = (IBaseExpression) map.get( key );
					if ( ( !icbe.getGroupName( )
							.equals( IBaseExpression.GROUP_OVERALL ) )
							&& !groupNameSet.contains( icbe.getGroupName( ) ) )
					{