@Test public void unsupported_unit() { FunctionExpression expr = dsl.interval(DSL.literal(1), DSL.literal("year_month")); assertThrows(ExpressionEvaluationException.class, () -> expr.valueOf(env), "interval unit year_month is not supported"); }
private FunctionResolver interval() { return define(BuiltinFunctionName.INTERVAL.getName(), impl(IntervalClause::interval, INTERVAL, INTEGER, STRING), impl(IntervalClause::interval, INTERVAL, LONG, STRING)); }
IntervalClause { private FunctionResolver interval() { return define(BuiltinFunctionName.INTERVAL.getName(), impl(IntervalClause::interval, INTERVAL, INTEGER, STRING), impl(IntervalClause::interval, INTERVAL, LONG, STRING)); } }
IntervalClause { private FunctionResolver interval() { return define(BuiltinFunctionName.INTERVAL.getName(), impl(IntervalClause::interval, INTERVAL, INTEGER, STRING), impl(IntervalClause::interval, INTERVAL, LONG, STRING)); }  }
IntervalClause { private FunctionResolver interval() { return define(BuiltinFunctionName.INTERVAL.getName(), impl(IntervalClause::interval, INTERVAL, INTEGER, STRING), impl(IntervalClause::interval, INTERVAL, LONG, STRING)); }  void register(BuiltinFunctionRepository repository); }
IntervalClause { private FunctionResolver interval() { return define(BuiltinFunctionName.INTERVAL.getName(), impl(IntervalClause::interval, INTERVAL, INTEGER, STRING), impl(IntervalClause::interval, INTERVAL, LONG, STRING)); }  void register(BuiltinFunctionRepository repository);  }