| 131 | } |
| 132 | |
| 133 | FORCE_INLINE |
| 134 | void round_decimal128(int64_t x_high, uint64_t x_low, int32_t x_precision, |
| 135 | int32_t x_scale, int32_t out_precision, int32_t out_scale, |
| 136 | int64_t* out_high, uint64_t* out_low) { |
| 137 | gandiva::BasicDecimalScalar128 x({x_high, x_low}, x_precision, x_scale); |
| 138 | |
| 139 | bool overflow = false; |
| 140 | auto out = gandiva::decimalops::Round(x, out_precision, 0, 0, &overflow); |
| 141 | *out_high = out.high_bits(); |
| 142 | *out_low = out.low_bits(); |
| 143 | } |
| 144 | |
| 145 | FORCE_INLINE |
| 146 | void round_decimal128_int32(int64_t x_high, uint64_t x_low, int32_t x_precision, |