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

feat: support schema change by idx and reverse #4985

Merged
merged 2 commits into from
Oct 25, 2023

Conversation

fansehep
Copy link
Contributor

Which issue does this PR close?

Closes #4908.

Rationale for this change

What changes are included in this PR?

Are there any user-facing changes?

@github-actions github-actions bot added the arrow Changes to the arrow crate label Oct 24, 2023
Comment on lines 60 to 63
/// Change the FieldRef as index `idx`
/// if index out of bounds, will panic
pub fn change_field(&mut self, idx: usize, field: impl Into<FieldRef>) {
self.fields[idx] = field.into()
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
/// Change the FieldRef as index `idx`
/// if index out of bounds, will panic
pub fn change_field(&mut self, idx: usize, field: impl Into<FieldRef>) {
self.fields[idx] = field.into()
/// Returns a mutable reference to the field at `idx`
pub fn field_mut(&mut self, idx: usize) -> &mut FieldRef {
&mut self.fields[idx]

What do you think about this instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think it's good!!! 😄

Signed-off-by: fan <[email protected]>
@tustvold tustvold merged commit c90aff3 into apache:master Oct 25, 2023
25 checks passed
@tustvold
Copy link
Contributor

Thank you

@fansehep
Copy link
Contributor Author

Thank you

Thans for your review. 😍

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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support StructArray in Cast Kernel
2 participants