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

[Python] Define API for user type checking of array types #17123

Closed
asfimport opened this issue Jul 24, 2017 · 3 comments
Closed

[Python] Define API for user type checking of array types #17123

asfimport opened this issue Jul 24, 2017 · 3 comments

Comments

@asfimport
Copy link

We have some subclasses of pyarrow.lib.DataType, but we haven't been designing with the intent of writing isinstance(arr.type, pyarrow.TimestampType). We should think about the public API for such type-checking or other type of schema validation.

Reporter: Wes McKinney / @wesm
Assignee: Wes McKinney / @wesm

PRs and other links:

Note: This issue was originally created as ARROW-1250. Please see the migration documentation for further details.

@asfimport
Copy link
Author

Phillip Cloud / @cpcloud:
The thing here is that it's hard to enforce only this usage. I removed this from the public API because it's too easy to have an unpleasant experience with these types. They are really only for wrapping their C++ counterparts and about the only thing useful you can do with them within Python is type checking. I think these should remain outside of the top level public API and be made public in one module deep (maybe pyarrow.types?).

@asfimport
Copy link
Author

Wes McKinney / @wesm:
I agree. Having a types module might be a good approach, possibly with some functions like pyarrow.types.is_integer, pyarrow.types.is_timestamp, etc.

@asfimport
Copy link
Author

Wes McKinney / @wesm:
Issue resolved by pull request 1183
#1183

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

No branches or pull requests

2 participants