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

minor: add a diagram to docstring for DictionaryArray #1909

Merged
merged 6 commits into from Jun 21, 2022

Conversation

alamb
Copy link
Contributor

@alamb alamb commented Jun 19, 2022

Rationale:

I made a diagram while working with @AssHero on apache/arrow-datafusion#2721 which I felt would be generally helpful as the keys and values terminology often gets confusing.

Changes:
Add some more docstrings to DictionaryArray based on apache/arrow-datafusion#2721 (comment)

@alamb alamb added the documentation Improvements or additions to documentation label Jun 19, 2022
@github-actions github-actions bot added the arrow Changes to the arrow crate label Jun 19, 2022
@codecov-commenter
Copy link

codecov-commenter commented Jun 19, 2022

Codecov Report

Merging #1909 (e712514) into master (aee2628) will increase coverage by 0.00%.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master    #1909   +/-   ##
=======================================
  Coverage   83.41%   83.41%           
=======================================
  Files         214      214           
  Lines       57004    57004           
=======================================
+ Hits        47550    47552    +2     
+ Misses       9454     9452    -2     
Impacted Files Coverage Δ
arrow/src/array/array_dictionary.rs 91.53% <ø> (ø)
parquet_derive/src/parquet_field.rs 65.98% <0.00%> (+0.45%) ⬆️

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 aee2628...e712514. Read the comment docs.

Copy link
Contributor

@HaoYang670 HaoYang670 left a comment

Choose a reason for hiding this comment

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

LGTM! Just leave a nit.
DictionaryArray is always used when you have data with many repeated values. So maybe it is better to give an example with short and fat values array and long keys array.

arrow/src/array/array_dictionary.rs Outdated Show resolved Hide resolved
Co-authored-by: Ruihang Xia <waynestxia@gmail.com>
Co-authored-by: Jörn Horstmann <git@jhorstmann.net>
@alamb
Copy link
Contributor Author

alamb commented Jun 21, 2022

DictionaryArray is always used when you have data with many repeated values. So maybe it is better to give an example with short and fat values array and long keys array.

Good point @HaoYang670 -- I updated the diagram in 8cf0dd3 -- what do you think?

@alamb alamb merged commit 50a9dd5 into apache:master Jun 21, 2022
17 checks passed
@alamb alamb deleted the alamb/dictionary_doc branch June 21, 2022 15:04
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 documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants