You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "ariel-miculas (via GitHub)" <gi...@apache.org> on 2026/02/18 20:33:41 UTC

[PR] fix: use try_shrink instead of shrink in try_resize [datafusion]

ariel-miculas opened a new pull request, #20424:
URL: https://github.com/apache/datafusion/pull/20424

   ## Which issue does this PR close?
   
   <!--
   We generally require a GitHub issue to be filed for all bug fixes and enhancements and this helps us generate change logs for our releases. You can link an issue to this PR using the GitHub syntax. For example `Closes #123` indicates that this PR will close issue #123.
   -->
   
   No issue
   
   ## Rationale for this change
   The `try_` functions should return errors instead of panicking.
   
   ## What changes are included in this PR?
   use `try_shrink` instead of `shrink`
   
   ## Are these changes tested?
   No, `try_shrink` is already tested.
   
   ## Are there any user-facing changes?
   No
   


-- 
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: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] fix: use try_shrink instead of shrink in try_resize [datafusion]

Posted by "ariel-miculas (via GitHub)" <gi...@apache.org>.
ariel-miculas commented on PR #20424:
URL: https://github.com/apache/datafusion/pull/20424#issuecomment-3958327844

   I don't have any example of when this can happen, it's just that shrink `Panics if capacity exceeds [Self::size]`, whereas `try_shrink` returns an error


-- 
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: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] fix: use try_shrink instead of shrink in try_resize [datafusion]

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


-- 
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: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] fix: use try_shrink instead of shrink in try_resize [datafusion]

Posted by "xanderbailey (via GitHub)" <gi...@apache.org>.
xanderbailey commented on PR #20424:
URL: https://github.com/apache/datafusion/pull/20424#issuecomment-3955506585

   Do you have an example of when shrink fails in this case? 


-- 
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: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org