class UnaryScalar<R, T> extends Scalar<R, T> {

    private final Function<T, R> func;
    private final DataType<T> type;

    public UnaryScalar(Signature signature,
                       BoundSignature boundSignature,
                       DataType<T> type,
                       Function<T, R> func) {
        super(signature, boundSignature);
        assert signature.hasFeature(Feature.NULLABLE) : "A UnaryScalar is NULLABLE by definition";
        assert boundSignature.argTypes().get(0).id() == type.id() :
            "The bound argument type of the signature must match the type argument";
        this.type = type;
        this.func = func;
    }

    @SafeVarargs
    @Override
    public final R evaluate(TransactionContext txnCtx, NodeContext nodeCtx, Input<T>... args) {<FILL_FUNCTION_BODY>}
}

        assert args.length == 1 : "UnaryScalar expects exactly 1 argument, got: " + args.length;
        T value = type.sanitizeValue(args[0].value());
        if (value == null) {
            return null;
        }
        return func.apply(value);
    
<methods>public BoundSignature boundSignature() ,public Scalar<R,T> compile(List<io.crate.expression.symbol.Symbol>, java.lang.String, io.crate.role.Roles) ,public transient abstract R evaluate(io.crate.metadata.TransactionContext, io.crate.metadata.NodeContext, Input<T>[]) ,public io.crate.expression.symbol.Symbol normalizeSymbol(io.crate.expression.symbol.Function, io.crate.metadata.TransactionContext, io.crate.metadata.NodeContext) ,public io.crate.metadata.functions.Signature signature() <variables>public static final Set<io.crate.metadata.Scalar.Feature> DETERMINISTIC_AND_COMPARISON_REPLACEMENT,public static final Set<io.crate.metadata.Scalar.Feature> DETERMINISTIC_ONLY,public static final Set<io.crate.metadata.Scalar.Feature> NO_FEATURES,protected final non-sealed BoundSignature boundSignature,protected final non-sealed io.crate.metadata.functions.Signature signature