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

[Ruby] Add a method to return column names in Arrow::Table #15085

Closed
heronshoes opened this issue Dec 24, 2022 · 2 comments · Fixed by #15089
Closed

[Ruby] Add a method to return column names in Arrow::Table #15085

heronshoes opened this issue Dec 24, 2022 · 2 comments · Fixed by #15089

Comments

@heronshoes
Copy link
Contributor

Describe the enhancement requested

Target method

Arrow::Table#keys or #names (tentative)

Proposed feature

Return an Array columns(&name).

Impact of this request

It will be useful in enhancements of #join .

Reference of this request

I am testing this feature in RedAmber by refinements.

https://github.com/heronshoes/red_amber/blob/main/lib/red_amber/refinements.rb#L144-L146

Component(s)

Ruby

@heronshoes heronshoes changed the title Add a method to return column names in Arrow::Table [Ruby] Add a method to return column names in Arrow::Table Dec 24, 2022
@kou
Copy link
Member

kou commented Dec 24, 2022

How about Arrow::Table#column_names?

@heronshoes
Copy link
Contributor Author

I agree. 'Key' is the word for join or group, 'name' is ambiguous. Thanks.
I will try to implement Arrow::Table#column_names.

heronshoes added a commit to heronshoes/arrow that referenced this issue Dec 25, 2022
heronshoes added a commit to heronshoes/arrow that referenced this issue Dec 26, 2022
kou added a commit that referenced this issue Dec 27, 2022
### What I did

* Add `ColumnContainable#column_names`.
  * Returns `columns.collect(&:name)`.
* Add tests for the tables that have unique keys and same keys.
* Add document.

### What I didn't

* Check whole code to be replaced for it.

### What I checked

* It works as a method Table#keys in RedAmber using refinements.

### Notes for reviewers

* I will search the code which should be replaced if reviewer requested me.

### Related Issue

* Closes: #15085

Lead-authored-by: Hirokazu SUZUKI (heronshoes) <heronshoes877@gmail.com>
Co-authored-by: Sutou Kouhei <kou@cozmixng.org>
Signed-off-by: Sutou Kouhei <kou@clear-code.com>
@kou kou added this to the 11.0.0 milestone Dec 27, 2022
EpsilonPrime pushed a commit to EpsilonPrime/arrow that referenced this issue Jan 5, 2023
### What I did

* Add `ColumnContainable#column_names`.
  * Returns `columns.collect(&:name)`.
* Add tests for the tables that have unique keys and same keys.
* Add document.

### What I didn't

* Check whole code to be replaced for it.

### What I checked

* It works as a method Table#keys in RedAmber using refinements.

### Notes for reviewers

* I will search the code which should be replaced if reviewer requested me.

### Related Issue

* Closes: apache#15085

Lead-authored-by: Hirokazu SUZUKI (heronshoes) <heronshoes877@gmail.com>
Co-authored-by: Sutou Kouhei <kou@cozmixng.org>
Signed-off-by: Sutou Kouhei <kou@clear-code.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants