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

GH-34966: [Go] Add InsertField and FieldIndex to Schema object #34967

Closed
wants to merge 2 commits into from

Conversation

yevgenypats
Copy link
Contributor

@yevgenypats yevgenypats commented Apr 7, 2023

Rationale for this change

What changes are included in this PR?

Are these changes tested?

Are there any user-facing changes?

@yevgenypats yevgenypats requested a review from zeroshade as a code owner April 7, 2023 13:52
@github-actions
Copy link

github-actions bot commented Apr 7, 2023

@github-actions
Copy link

github-actions bot commented Apr 7, 2023

⚠️ GitHub issue apache/arrow-go#60 has been automatically assigned in GitHub to PR creator.

@yevgenypats yevgenypats changed the title GH-34966: Add InsertField and FieldIndex to Schema object GH-34966: [Go] Add InsertField and FieldIndex to Schema object Apr 7, 2023
Copy link
Member

@zeroshade zeroshade left a comment

Choose a reason for hiding this comment

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

where's the InsertField method? 😄

@@ -197,6 +197,16 @@ func (sc *Schema) FieldIndices(n string) []int {
return sc.index[n]
}

// FieldIndex return index of the unique field with the given name.
Copy link
Member

Choose a reason for hiding this comment

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

typo: returns the index

Also, is there a reason to have this in addition to the existing FieldIndices method? A consumer could just do the same length check and use index 0 themselves.

@github-actions github-actions bot added awaiting changes Awaiting changes and removed awaiting review Awaiting review labels Apr 11, 2023
@vibhatha
Copy link
Collaborator

@zeroshade I also took a look at the PR and built locally too. FieldIndex looks right to me. Also, the InsertField function is not available.

@candiduslynx candiduslynx deleted the feat/schema branch June 2, 2023 11:59
@zeroshade
Copy link
Member

No activity since April, I'm going to close this for now. Feel free to reopen if this is still needed. Thanks!

@zeroshade zeroshade closed this Jul 17, 2023
Copy link

⚠️ GitHub issue #34966 has no components, please add labels for components.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Go]: Add IndexField and InsertField for Schema
3 participants