def METHOD_NAME(self, value: str, coltype: FractionalType) -> str:
    # If a decimal value has trailing zeros in a fractional part, when casting to string they are dropped.
    # For example:
    #   select toString(toDecimal128(1.10, 2));  -- the result is 1.1
    #   select toString(toDecimal128(1.00, 2)); -- the result is 1
    # So, we should use some custom approach to save these trailing zeros.
    # To avoid it, we can add a small value like 0.000001 to prevent dropping of zeros from the end when casting.
    # For examples above it looks like:
    #   select toString(toDecimal128(1.10, 2 + 1) + toDecimal128(0.001, 3)); -- the result is 1.101
    # After that, cut an extra symbol from the string, i.e. 1.101 -> 1.10
    # So, the algorithm is:
    # 1. Cast to decimal with precision + 1
    # 2. Add a small value 10^(-precision-1)
    # 3. Cast the result to string
    # 4. Drop the extra digit from the string. To do that, we need to slice the string
    #    with length = digits in an integer part + 1 (symbol of ".") + precision
    if coltype.precision == 0:
        return self.to_string(f"round({value})")
    precision = coltype.precision
    # TODO: too complex, is there better performance way?
    value = f"""
        if({value} >= 0, '', '-') || left(
            toString(
                toDecimal128(
                    round(abs({value}), {precision}),
                    {precision} + 1
                )
                +
                toDecimal128(
                    exp10(-{precision + 1}),
                    {precision} + 1
                )
            ),
            toUInt8(
                greatest(
                    floor(log10(abs({value}))) + 1,
                    1
                )
            ) + 1 + {precision}
        )
    """
    return value