class SubtractTimestampScalar extends Scalar<Period, Object> {

    public static void register(Functions.Builder module) {<FILL_FUNCTION_BODY>}

    public SubtractTimestampScalar(Signature signature, BoundSignature boundSignature) {
        super(signature, boundSignature);
    }

    @Override
    public Period evaluate(TransactionContext txnCtx, NodeContext nodeCtx, Input<Object>[] args) {
        Long start = (Long) args[1].value();
        Long end = (Long) args[0].value();
        if (end == null || start == null) {
            return null;
        }
        return new Period(end - start).normalizedStandard(PeriodType.yearMonthDayTime());
    }
}

        for (var timestampType : List.of(DataTypes.TIMESTAMP, DataTypes.TIMESTAMPZ)) {
            module.add(
                Signature.scalar(
                    ArithmeticFunctions.Names.SUBTRACT,
                    timestampType.getTypeSignature(),
                    timestampType.getTypeSignature(),
                    DataTypes.INTERVAL.getTypeSignature()
                ),
                SubtractTimestampScalar::new
            );
        }
    
<methods>public BoundSignature boundSignature() ,public Scalar<Period,java.lang.Object> compile(List<io.crate.expression.symbol.Symbol>, java.lang.String, io.crate.role.Roles) ,public transient abstract Period evaluate(io.crate.metadata.TransactionContext, io.crate.metadata.NodeContext, Input<java.lang.Object>[]) ,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