You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-08-27 16:01:57 +03:00
- MCOL-4618 FLOOR(-9999.0) returns a bad result - MCOL-4653 CEIL(negativeNarrowDecimal) returns a wrong result Main changes: a. Moving ROUND, CEIL, FLOOR related code into a new simple class template DecomposedDecimal, which is reused for 64 and 128 bit decimal. b. Using DecomposedDecimal in TDecimal64 and TDecimal128 to implement ROUND, CEIL, FLOOR related methods. c. Adding corresponding wrapper methods to the class Decimal. d. Using new Decimal methods in Func_ceil and Func_floor. Additional minor changed: - Adding "explicit" to TSInt128 constructors to avoid hidden data type conversion and erroneous choice between 64 vs 128 bit APIs when using Decimal. Now one can call constructors in this self explanatory way: - Decimal(TSInt128(some_int_value), scale, precision) to create a wide decimal - Decimal(TSInt64(some_int_value, scale, precision) to create a narrow decimal TODO: Consider changing Decimal(int64_t val, int8_t s, uint8_t p, const int128_t &val128 = 0) to Decimal(int64_t val, int8_t s, uint8_t p, const int128_t &val128) (or even removing this constructor) to disallow compilation of: Decimal(some_trivial_type_value, scale, precision)