| 119 | } |
| 120 | |
| 121 | FORCE_INLINE |
| 122 | void floor_decimal128(int64_t x_high, uint64_t x_low, int32_t x_precision, |
| 123 | int32_t x_scale, int32_t out_precision, int32_t out_scale, |
| 124 | int64_t* out_high, uint64_t* out_low) { |
| 125 | gandiva::BasicDecimalScalar128 x({x_high, x_low}, x_precision, x_scale); |
| 126 | |
| 127 | bool overflow = false; |
| 128 | auto out = gandiva::decimalops::Floor(x, &overflow); |
| 129 | *out_high = out.high_bits(); |
| 130 | *out_low = out.low_bits(); |
| 131 | } |
| 132 | |
| 133 | FORCE_INLINE |
| 134 | void round_decimal128(int64_t x_high, uint64_t x_low, int32_t x_precision, |