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

Default to int64 in Python3, add long and unicode to schema and type inference #821

Merged
merged 3 commits into from
Nov 22, 2019

Conversation

sc1f
Copy link
Contributor

@sc1f sc1f commented Nov 18, 2019

This PR changes our inference check to infer int32s in python 2 and int64 in python 3. Additionally, it allows long and unicode to be used in schemas; long maps to int64, and unicode maps to string.

Actual storage semantics of the values are not changed, so the limit for numeric types remains at 64 bits. Passing in a value that overflows int64 is undefined behavior.

Additionally wraps the call to iter to generate more meaningful errors when assessing the type of a dataset.

@sc1f sc1f changed the title Add long and unicode to schema and type inferrence Default to int64 in Python3, add long and unicode to schema and type inference Nov 18, 2019
@texodus
Copy link
Member

texodus commented Nov 22, 2019

Looks good, thanks for the PR!

@texodus texodus merged commit 01e24b9 into master Nov 22, 2019
@texodus texodus deleted the py2 branch November 22, 2019 21:38
@texodus texodus added bug Concrete, reproducible bugs and removed enhancement Feature requests or improvements labels Jan 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Concrete, reproducible bugs Python
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants