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

Support nullable keys in DictionaryArray::try_new #1430

Merged

Conversation

jhorstmann
Copy link
Contributor

Which issue does this PR close?

Closes #1429.

@github-actions github-actions bot added the arrow Changes to the arrow crate label Mar 11, 2022
Copy link
Member

@sunchao sunchao left a comment

Choose a reason for hiding this comment

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

LGTM with one nit.

Ok(data.into())
match keys.data().null_buffer() {
Some(buffer) if keys.data().null_count() > 0 => {
data = data.null_bit_buffer(buffer.clone());
Copy link
Member

Choose a reason for hiding this comment

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

nit: we can update the null count here too, instead of calculating it later in build.

@codecov-commenter
Copy link

Codecov Report

Merging #1430 (5ba4a14) into master (b12ecd2) will increase coverage by 0.00%.
The diff coverage is 100.00%.

❗ Current head 5ba4a14 differs from pull request most recent head 85e1fe3. Consider uploading reports for the commit 85e1fe3 to get more accurate results

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1430   +/-   ##
=======================================
  Coverage   82.67%   82.67%           
=======================================
  Files         185      185           
  Lines       53764    53778   +14     
=======================================
+ Hits        44449    44463   +14     
  Misses       9315     9315           
Impacted Files Coverage Δ
arrow/src/array/array_dictionary.rs 91.66% <100.00%> (+0.54%) ⬆️
arrow/src/datatypes/datatype.rs 66.40% <0.00%> (-0.40%) ⬇️
parquet_derive/src/parquet_field.rs 65.98% <0.00%> (-0.23%) ⬇️
arrow/src/array/transform/mod.rs 86.43% <0.00%> (+0.22%) ⬆️

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 b12ecd2...85e1fe3. Read the comment docs.

@sunchao sunchao merged commit d9099c4 into apache:master Mar 11, 2022
@sunchao
Copy link
Member

sunchao commented Mar 11, 2022

Merged, thanks!

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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DictionaryArray::try_new ignores validity bitmap of the keys
3 participants