Bug 201017 TopN, TopPercent, BottomPercent filters will lead NPE when the values contains NULL[07]
data/org.eclipse.birt.data/src/org/eclipse/birt/data/engine/script/NEvaluator.java
else
			{
				if( n_value < 0 )
					throw new DataException(ResourceConstants.INVALID_TOP_BOTTOM_N_ARGUMENT);
				N = (int)n_value;
			}
			
		}
		
		
		Object value = ScriptEvalUtil.evalExpr( op_expr, cx, scope, "Filter", 0 );
		
		if ( filterPassController.getPassLevel( ) == FilterPassController.FIRST_PASS )
		{
			return doFirstPass( value );
		}
		else if ( filterPassController.getPassLevel( ) == FilterPassController.SECOND_PASS )
		{
			return doSecondPass( );
		}
		return false;
	}
	/**
	 * Do the first pass. In the first pass we maintain a value list and a row id list that will
	 * host all top/bottom N values/rowIds so that in pass 2 we can use them to filter rows out.
	 * @param value
	 * @return
	 * @throws DataException
	 */
	private boolean doFirstPass( Object value ) throws DataException