queryDefn.addExpression( expressions[ i ],BaseTransform.ON_EACH_ROW ); i++;
queryDefn.addResultSetExpression( names[i], expressions[ i ] );
	public void test_NegativeValueFilterGroup( ) throws Exception	{		String sqlStatement = "select COUNTRY,AMOUNT, SALE_DATE from " + getTestTableName( );		( ( OdaDataSetDesign )this.dataSet ).setQueryText( sqlStatement );						IBaseExpression[] expressions = new IBaseExpression[]{				new ScriptExpression( "row.COUNTRY" ),				new ScriptExpression( "row.AMOUNT" ),				new ScriptExpression( "row.SALE_DATE" )						};				QueryDefinition queryDefn = new QueryDefinition( );		queryDefn.setDataSetName( this.dataSet.getName( ) );		int expreLength = expressions.length;		int i = 0;		while ( i < expreLength )		{			queryDefn.addExpression( expressions[ i ],BaseTransform.ON_EACH_ROW );			i++;					}						FilterDefinition filterDefn = new FilterDefinition( 				new ConditionalExpression( "Total.sum(row.Amount,null,1)", IConditionalExpression.OP_BOTTOM_PERCENT, "-10" ) 					);		GroupDefinition groupDefn = new GroupDefinition();		groupDefn.setKeyExpression( "row.SALE_DATE" );				groupDefn.setInterval( 2 );		groupDefn.setIntervalRange( IGroupDefinition.MONTH_INTERVAL);						groupDefn.addFilter( filterDefn );		try		{			queryDefn.addGroup( groupDefn );			IPreparedQuery preparedQuery = dataEngine.prepare( queryDefn );			IQueryResults queryResults = preparedQuery.execute( null );			IResultIterator resultIt = queryResults.getResultIterator( );			fail("should throw out exception here");		}			catch( DataException e )		{					}					}