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-9287: [C++] Support unsigned dictionary indices #7659

Closed
wants to merge 10 commits into from

Conversation

wesm
Copy link
Member

@wesm wesm commented Jul 7, 2020

Summary of places where changes were needed:

  • Add to integration tests. uint64 does not work in JavaScript so this is disabled temporarily (NEEDS TICKET)
  • Support in DictionaryArray::GetValueIndex, Transpose, FromArrays
  • Support in C interface implementation
  • Support in IPC read/write
  • Handle in DictionaryScalar::GetEncodedValue
  • Relax checks in DictionaryType argument validation
  • Add unsigned int support to internal::TransposeInts
  • Support in Parquet direct dictionary encoding (PutIndices)

Converting to pandas from unsigned indices is disabled (raises exception). That turned out to be somewhat involved because of how nulls are handled (pandas only accepts signed integers), so think we should deal with this as follow up (NEEDS TICKET).

@wesm wesm requested a review from pitrou July 7, 2020 14:33
@github-actions
Copy link

github-actions bot commented Jul 7, 2020

@kszucs
Copy link
Member

kszucs commented Jul 7, 2020

Please add the unsigned types to the DictionaryScalar as well.

@wesm
Copy link
Member Author

wesm commented Jul 7, 2020

@kszucs done

Copy link
Member

@pitrou pitrou 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 a couple comments

cpp/src/arrow/array/array_dict_test.cc Outdated Show resolved Hide resolved
cpp/src/arrow/compute/kernels/scalar_cast_test.cc Outdated Show resolved Hide resolved
cpp/src/arrow/compute/kernels/scalar_cast_test.cc Outdated Show resolved Hide resolved
cpp/src/arrow/scalar.cc Outdated Show resolved Hide resolved
cpp/src/arrow/testing/util.h Outdated Show resolved Hide resolved
cpp/src/arrow/type_test.cc Outdated Show resolved Hide resolved
dev/archery/archery/integration/datagen.py Outdated Show resolved Hide resolved
@wesm
Copy link
Member Author

wesm commented Jul 8, 2020

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants