KEMBAR78
add guidelines for choosing panics or error results by jp0317 · Pull Request #6958 · apache/arrow-rs · GitHub
Skip to content

Conversation

@jp0317
Copy link
Contributor

@jp0317 jp0317 commented Jan 9, 2025

Which issue does this PR close?

Closes #6737

Rationale for this change

Add guidelines as per discussed in #6737

What changes are included in this PR?

guidelines

Are there any user-facing changes?

n/a

@tustvold
Copy link
Contributor

tustvold commented Jan 9, 2025

I wonder if there is some way to work this comment into this #6737 (comment)

I think it articulates something very important, that simply blindly changing panics to results is not desirable

@jp0317
Copy link
Contributor Author

jp0317 commented Jan 9, 2025

I wonder if there is some way to work this comment into this #6737 (comment)

I think it articulates something very important, that simply blindly changing panics to results is not desirable

Thanks for the comment! Added a note to emphasize that it's about reporting invalidity of user input as error results which does not necessarily replaces panic/assert for sanity checks, PTAL!

Copy link
Contributor

@alamb alamb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @jp0317 🙏 -- I think this is better than what we have on main (nothing!) and reflects the consensus of #6737 so could be merged in.

I left a wording suggestion but we can also consider that change as a follow on PR as well in my opinion

@alamb alamb added development-process Related to development process of arrow-rs documentation Improvements or additions to documentation labels Jan 10, 2025
@alamb alamb mentioned this pull request Jan 10, 2025
jp0317 and others added 2 commits January 10, 2025 18:09
Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>
@jp0317
Copy link
Contributor Author

jp0317 commented Jan 10, 2025

Thanks for the reviews! Updated as suggested, PTAL.

@jp0317 jp0317 requested review from alamb and westonpace January 10, 2025 23:19
Copy link
Contributor

@alamb alamb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me -- thanks again @jp0317

@tustvold tustvold merged commit 3b31ff6 into apache:main Jan 13, 2025
9 checks passed
svencowart pushed a commit to elastiflow/arrow-rs that referenced this pull request Jan 14, 2025
* add guidelines for choosing panics or error results

* add note to clarify that checking invalidity of user input is the key point

* apply reviewer suggestions

Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>

* remove redundant word

* fix markdown format

---------

Co-authored-by: jp0317 <zjpzlz@gmail.com>
Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>
totoroyyb pushed a commit to totoroyyb/arrow-rs that referenced this pull request Jan 20, 2025
* add guidelines for choosing panics or error results

* add note to clarify that checking invalidity of user input is the key point

* apply reviewer suggestions

Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>

* remove redundant word

* fix markdown format

---------

Co-authored-by: jp0317 <zjpzlz@gmail.com>
Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

development-process Related to development process of arrow-rs documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Avoid panics?

4 participants