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

ARROW-10336: [Rust] Added FromIter and ToIter for string arrays #8486

Closed
wants to merge 2 commits into from
Closed

ARROW-10336: [Rust] Added FromIter and ToIter for string arrays #8486

wants to merge 2 commits into from

Conversation

jorgecarleitao
Copy link
Member

What the title says: adds string array from and to iterators.

This PR also simplifies some of the functions around strings.

@github-actions
Copy link

Copy link
Contributor

@vertexclique vertexclique left a comment

Choose a reason for hiding this comment

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

I think type arguments should be always screaming snake case in whole codebase. Apart from that it looks ok.

Copy link
Contributor

@nevi-me nevi-me left a comment

Choose a reason for hiding this comment

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

LGTM

@jorgecarleitao
Copy link
Member Author

jorgecarleitao commented Oct 26, 2020

@vertexclique , do you refer to the DATA_TYPE? I changed it to upper case after clippy asked me to express const as upper case.

}
}

impl<'a, Ptr, OffsetSize: StringOffsetSizeTrait> FromIterator<Ptr>
Copy link
Contributor

Choose a reason for hiding this comment

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

I meant type params like:

Suggested change
impl<'a, Ptr, OffsetSize: StringOffsetSizeTrait> FromIterator<Ptr>
impl<'a, P, OS: StringOffsetSizeTrait> FromIterator<P>

Copy link
Member Author

Choose a reason for hiding this comment

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

I see. I have no strong feelings about it, I just think that explicit is better than implicit, and P or OS forces the reader to go to the where clause to understand what they mean. OTOH, generics are generics, and also rust seems to prefer one-letter generic types.

I will leave it like this just because the rest of the code base around offsets is like this.

Copy link
Contributor

Choose a reason for hiding this comment

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

Happy with it as is, if we need to change, we can do that for the whole module/codebase in future

@nevi-me nevi-me closed this in e22820f Oct 27, 2020
@jorgecarleitao jorgecarleitao deleted the from_opt_vec_str branch October 28, 2020 04:16
GeorgeAp pushed a commit to sirensolutions/arrow that referenced this pull request Jun 7, 2021
What the title says: adds string array from and to iterators.

This PR also simplifies some of the functions around strings.

Closes apache#8486 from jorgecarleitao/from_opt_vec_str

Authored-by: Jorge C. Leitao <jorgecarleitao@gmail.com>
Signed-off-by: Neville Dipale <nevilledips@gmail.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 this pull request may close these issues.

None yet

3 participants