```sql
SELECT
    floor(toDecimal64(1232.123132, 4) AS D64),
    ceiling(D64),
    round(D64),
    roundBankers(D64),
    floor(toDecimal128(1232.123132, 24) AS D128),
    ceiling(D128),
    round(D128),
    roundBankers(D128),
    floor(toDecimal256(1232.123132, 24) AS D256),
    ceiling(D256),
    round(D256),
    roundBankers(D256)
FORMAT Vertical

Query id: 04db8c13-4888-47b6-908b-ba1268138f26

Row 1:
──────
floor(toDecimal64(1232.123132, 4)):          1232
ceil(toDecimal64(1232.123132, 4)):           1233
round(toDecimal64(1232.123132, 4)):          1232
roundBankers(toDecimal64(1232.123132, 4)):   1232
floor(toDecimal128(1232.123132, 24)):        1232.12311679615299966394772
ceil(toDecimal128(1232.123132, 24)):         1232.123135242897073373499335
round(toDecimal128(1232.123132, 24)):        1232.123135242897073373499335
roundBankers(toDecimal128(1232.123132, 24)): 1232.123135242897073373499335
floor(toDecimal256(1232.123132, 24)):        1232.12311679615299966394772
ceil(toDecimal256(1232.123132, 24)):         1232.123135242897073373499335
round(toDecimal256(1232.123132, 24)):        1232.123135242897073373499335
roundBankers(toDecimal256(1232.123132, 24)): 1232.123135242897073373499335
```

}
            else
            {
                size_t scale = intExp10(-scale_arg);
                FunctionRoundingImpl<ScaleMode::Negative>::apply(col->getData(), scale, vec_res);
            }
        }
        return col_res;
    }
};
template <is_decimal T, RoundingMode rounding_mode, TieBreakingMode tie_breaking_mode>
struct Dispatcher<T, rounding_mode, tie_breaking_mode>
{
public:
    static ColumnPtr apply(const IColumn * col_general, Scale scale_arg)
    {
        const auto * const col = checkAndGetColumn<ColumnDecimal<T>>(col_general);
        const typename ColumnDecimal<T>::Container & vec_src = col->getData();
        auto col_res = ColumnDecimal<T>::create(vec_src.size(), col->getScale());
        auto & vec_res = col_res->getData();
        if (!vec_res.empty())
            DecimalRoundingImpl<T, rounding_mode, tie_breaking_mode>::apply(col->getData(), col->getScale(), vec_res, scale_arg);
        return col_res;
    }
};
/** A template for functions that round the value of an input parameter of type
  * (U)Int8/16/32/64, Float32/64 or Decimal32/64/128, and accept an additional optional parameter (default is 0).
  */
template <typename Name, RoundingMode rounding_mode, TieBreakingMode tie_breaking_mode>
class FunctionRounding : public IFunction