| 308 | } |
| 309 | |
| 310 | int128_t readJavaDecimal(ByteInputStream* source) { |
| 311 | // ByteInputStream does not support reading int128_t values. |
| 312 | auto low = source->read<int64_t>(); |
| 313 | auto high = source->read<int64_t>(); |
| 314 | // 'high' is in signed magnitude representation. |
| 315 | if (high < 0) { |
| 316 | // Remove the sign bit before building the int128 value. |
| 317 | // Negate the value. |
| 318 | return -1 * HugeInt::build(high & DecimalUtil::kInt64Mask, low); |
| 319 | } |
| 320 | return HugeInt::build(high, low); |
| 321 | } |
| 322 | |
| 323 | void readDecimalValues( |
| 324 | ByteInputStream* source, |
no test coverage detected