You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@paimon.apache.org by "thswlsqls (via GitHub)" <gi...@apache.org> on 2026/07/08 21:26:44 UTC
[I] [Bug] Composite type default size overflows to negative [paimon]
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: issues-unsubscribe@paimon.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Bug] Composite type default size overflows to negative [paimon]
Posted by "JingsongLi (via GitHub)" <gi...@apache.org>.
JingsongLi closed issue #8513: [Bug] Composite type default size overflows to negative
URL: https://github.com/apache/paimon/issues/8513
--
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: issues-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org