Bug 182061 Data engine changes to support result set sharing
data/org.eclipse.birt.data/src/org/eclipse/birt/data/engine/impl/PreparedQuery.java
addParentBindings(parentBindings);
		}
	}
	/**
	 * 
	 * @param parentBindings
	 */
	private void addParentBindings( Map parentBindings ) {
		Iterator it = parentBindings.keySet( ).iterator( );
		while ( it.hasNext( ) )
		{
			Object o = it.next( );
			IBaseExpression expr = (IBaseExpression)parentBindings.get( o );
			if ( expr instanceof IScriptExpression )
			{
				if (!ExpressionUtil.hasAggregation( ( (IScriptExpression) expr ).getText( ) ))
				{
					if ( baseQueryDefn.getResultSetExpressions( )
							.get( o ) == null )
					{	
						baseQueryDefn.getResultSetExpressions( )
								.put( o, copyScriptExpr( expr ) );
					}
				}
			}
		}
	}
	/**
	 * Colon a script expression, however do not populate the "AggregateOn" field. All the column binding that inherit
	 * from parent query by sub query should have no "AggregateOn" field, for they could not be aggregations. However,