class SubstringExpression implements Expression, PipeExpression {

    @Override
    public ExpressionResult apply(ExpressionContext context, ExpressionResult input) {
        ExpressionResult value = expressions[0].apply(context, input);
        return (value != null && value.isNonNull()) ?
                new StringExpressionResult(doSubstring(context, input, value.toString())) :
                NullExpressionResult.INSTANCE ;
    }

    public  SubstringExpression(String alias, Expression[] expressions);

}