thswlsqls opened a new issue, #8513: URL: https://github.com/apache/paimon/issues/8513
**Search before asking** - [x] I searched in the [issues](https://github.com/apache/paimon/issues) and found nothing similar. **Paimon version** master @ 0e22fa885 / 2.0-SNAPSHOT **Compute Engine** Engine-agnostic (core, paimon-api) **Minimal reproduce step** `RowType.defaultSize()` (paimon-api RowType.java line 161) sums child `defaultSize()` values with a plain int `sum()`. `MapType.defaultSize()` (line 69) and `MultisetType.defaultSize()` (line 66) add child sizes with plain `+`. When a child is large (e.g. a `VECTOR(Integer.MAX_VALUE, FLOAT)`), the int sum overflows and wraps to a negative value. **What doesn't meet your expectations?** `defaultSize()` should saturate at `Integer.MAX_VALUE`, never return a negative size. Merged PR #8360 fixed exactly this for `VectorType.defaultSize()` via `MathUtils.multiplySafely`; a ROW/MAP/MULTISET wrapping such a VECTOR re-triggers the overflow #8360 prevented. **Anything else?** Fix mirrors #8360: reuse the existing `MathUtils.addSafely(int,int)` (paimon-api) to saturate the composite sums. No new API or dependency. **Are you willing to submit a PR?** - [x] I'm willing to submit a PR! -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
