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-11313: [Rust] Fixed size_hint #9258

Closed
wants to merge 1 commit into from
Closed

ARROW-11313: [Rust] Fixed size_hint #9258

wants to merge 1 commit into from

Conversation

jorgecarleitao
Copy link
Member

size_hint should return the remaining items, not the total number of items.

@github-actions
Copy link

@codecov-io
Copy link

Codecov Report

Merging #9258 (f76ceab) into master (1393188) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #9258   +/-   ##
=======================================
  Coverage   81.61%   81.61%           
=======================================
  Files         215      215           
  Lines       51867    51891   +24     
=======================================
+ Hits        42329    42353   +24     
  Misses       9538     9538           
Impacted Files Coverage Δ
rust/arrow/src/array/iterator.rs 93.45% <100.00%> (ø)
rust/parquet/src/arrow/schema.rs 91.66% <100.00%> (+0.16%) ⬆️
rust/arrow/src/array/transform/fixed_binary.rs 84.21% <0.00%> (+5.26%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1401359...ac029f6. Read the comment docs.

Copy link
Contributor

@alamb alamb left a comment

Choose a reason for hiding this comment

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

This looks consistent with https://doc.rust-lang.org/std/iter/trait.Iterator.html#method.size_hint to me. 👍 @jorgecarleitao

I also found another implementation of size_hint but that seems to be doing the right thing: https://github.com/alamb/arrow/blob/master/rust/arrow/src/util/bit_chunk_iterator.rs#L156

@alamb alamb closed this in 8e218e0 Jan 19, 2021
@alamb
Copy link
Contributor

alamb commented Jan 19, 2021

I merged this branch locally and ran the tests and everything looked good 👍

kszucs pushed a commit that referenced this pull request Jan 25, 2021
`size_hint` should return the remaining items, not the total number of items.

Closes #9258 from jorgecarleitao/fix_size_hint

Authored-by: Jorge C. Leitao <jorgecarleitao@gmail.com>
Signed-off-by: Andrew Lamb <andrew@nerdnetworks.org>
GeorgeAp pushed a commit to sirensolutions/arrow that referenced this pull request Jun 7, 2021
`size_hint` should return the remaining items, not the total number of items.

Closes apache#9258 from jorgecarleitao/fix_size_hint

Authored-by: Jorge C. Leitao <jorgecarleitao@gmail.com>
Signed-off-by: Andrew Lamb <andrew@nerdnetworks.org>
michalursa pushed a commit to michalursa/arrow that referenced this pull request Jun 13, 2021
`size_hint` should return the remaining items, not the total number of items.

Closes apache#9258 from jorgecarleitao/fix_size_hint

Authored-by: Jorge C. Leitao <jorgecarleitao@gmail.com>
Signed-off-by: Andrew Lamb <andrew@nerdnetworks.org>
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

4 participants