You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@paimon.apache.org by "QuakeWang (via GitHub)" <gi...@apache.org> on 2026/06/25 16:38:33 UTC

[PR] [api] Avoid overflow in VectorType default size [paimon]

QuakeWang opened a new pull request, #8360:
URL: https://github.com/apache/paimon/pull/8360

   ### Purpose
   
   `VectorType.defaultSize()` previously multiplied the element default size by the vector length using int arithmetic. For very large vector lengths, this could overflow and return a negative size estimate.
   
   This PR uses `MathUtils.multiplySafely` to cap overflow at `Integer.MAX_VALUE` and keep size estimation valid.
   
   ### Tests
   
     - `mvn -pl paimon-api -Pfast-build -Dtest=VectorTypeTest test`
     - `mvn -pl paimon-api -Pfast-build -DskipTests compile`
     - `mvn -pl paimon-api -Dtest=VectorTypeTest test`


-- 
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


Re: [PR] [api] Avoid overflow in VectorType default size [paimon]

Posted by "JingsongLi (via GitHub)" <gi...@apache.org>.
JingsongLi commented on PR #8360:
URL: https://github.com/apache/paimon/pull/8360#issuecomment-4814414185

   +1


-- 
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


Re: [PR] [api] Avoid overflow in VectorType default size [paimon]

Posted by "JingsongLi (via GitHub)" <gi...@apache.org>.
JingsongLi merged PR #8360:
URL: https://github.com/apache/paimon/pull/8360


-- 
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