@Test public void testEvaluateTimeStamp() { MethodExpression methodExpression = new MethodExpression(new Abs(null), "evaluate", new IExpression[] {new ConstExpression(new Timestamp(0))}); try { methodExpression.evaluate(new TupleEvent()); fail("Expected an StreamingRuntimeException to be thrown"); } catch (StreamingRuntimeException e) { assertEquals(e.getErrorCode(), ErrorCode.FUNCTION_UNSUPPORTED_PARAMETERS); } }
public Integer evaluate(Integer number) { if (number == null) { return null; } return Math.abs(number); }
Abs extends UDF { public Integer evaluate(Integer number) { if (number == null) { return null; } return Math.abs(number); } }
Abs extends UDF { public Integer evaluate(Integer number) { if (number == null) { return null; } return Math.abs(number); } Abs(Map<String, String> config); }
Abs extends UDF { public Integer evaluate(Integer number) { if (number == null) { return null; } return Math.abs(number); } Abs(Map<String, String> config); Integer evaluate(Integer number); Long evaluate(Long number); Float evaluate(Float number); Double evaluate(Double number); BigDecimal evaluate(BigDecimal number); }
Abs extends UDF { public Integer evaluate(Integer number) { if (number == null) { return null; } return Math.abs(number); } Abs(Map<String, String> config); Integer evaluate(Integer number); Long evaluate(Long number); Float evaluate(Float number); Double evaluate(Double number); BigDecimal evaluate(BigDecimal number);  }