Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor RecordBatch::validate_new_batch #1350

Closed
HaoYang670 opened this issue Feb 22, 2022 · 3 comments · Fixed by #1361
Closed

Refactor RecordBatch::validate_new_batch #1350

HaoYang670 opened this issue Feb 22, 2022 · 3 comments · Fixed by #1361
Labels
arrow Changes to the arrow crate enhancement Any new improvement worthy of a entry in the changelog

Comments

@HaoYang670
Copy link
Contributor

Describe the bug
The function validate_new_batch constains some repetitive code. We could find a way to refactor it.
https://github.com/apache/arrow-rs/blob/master/arrow/src/record_batch.rs#L133-L166

To Reproduce

Expected behavior
Clean and readable code

Additional context
Add any other context about the problem here.

@HaoYang670 HaoYang670 added the bug label Feb 22, 2022
@HaoYang670
Copy link
Contributor Author

Using Iterator.find or Iterator.any may be a good choice.

@HaoYang670
Copy link
Contributor Author

HaoYang670 commented Feb 23, 2022

@alamb Is this refactoring worth to do?

@alamb
Copy link
Contributor

alamb commented Feb 27, 2022

Hi @HaoYang670 -- sorry i am just getting back from a week away. I will check this (and the linked PR out) over the next day or two

@alamb alamb added arrow Changes to the arrow crate enhancement Any new improvement worthy of a entry in the changelog and removed bug labels Mar 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arrow Changes to the arrow crate enhancement Any new improvement worthy of a entry in the changelog
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants