Bug 182061 Data engine changes to support result set sharing
data/org.eclipse.birt.data.tests/test/org/eclipse/birt/data/engine/binding/FilterByRowTest.java
ScriptDataSetDesign dset = newDataSet( );
		dset.setDataSource( dsource.getName( ) );
		dataEngine.defineDataSource( dsource );
		dataEngine.defineDataSet( dset );
		
		QueryDefinition rqDefn = new QueryDefinition();
		rqDefn.setDataSetName("test");
		
		String bindingNameFilter = "ROW_CH";
		ScriptExpression bindingExprFilter = new ScriptExpression( "dataSetRow.CH",
				0 );
		FilterDefinition filterDefn = new FilterDefinition( new ScriptExpression( "row.ROW_CH == null" ) );
		rqDefn.addResultSetExpression( bindingNameFilter, bindingExprFilter );
		rqDefn.getFilters( ).add( filterDefn );		
		IPreparedQuery pq = dataEngine.prepare( rqDefn );
		IQueryResults qr = pq.execute( jsScope );
		IResultIterator ri = qr.getResultIterator( );
		int rowIndex = 0;
		while ( ri.next( ) )
		{
			rowIndex++;
		}
		
		assertEquals( rowIndex, 2 );
		
		rqDefn.getFilters().clear();
		rqDefn.getFilters().add( new FilterDefinition ( new ScriptExpression("row.ROW_CH != null")));
		
		pq = dataEngine.prepare( rqDefn );
		qr = pq.execute( jsScope );