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-1125: Python: Add public C++ API to unwrap PyArrow object #827

Closed
wants to merge 4 commits into from

Conversation

xhochy
Copy link
Member

@xhochy xhochy commented Jul 10, 2017

No description provided.

Change-Id: I333d13016475aee86df57cb83d24eaac1582b8da
Change-Id: Icd7cf12719f143d5d63aa6b7c46af7b6d230b5f0
Change-Id: I43748f8616a3a68f0849c34dca7dc59ade5c1a5a
Change-Id: I127c51caffefac474b6f60781121f5fed5a1fb23
field_ = <Field>(field)
return field_.sp_field

return shared_ptr[CField]()
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this the same as returning nullptr?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, nullptr would only invoke the default constructor and return the same object.

return isinstance(buffer, Buffer)


cdef public api shared_ptr[CBuffer] pyarrow_unwrap_buffer(object buffer):
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there any reason not to give the arguments stronger types here? Like:

... pyarrow_unwrap_buffer(Buffer buffer)

Copy link
Member Author

Choose a reason for hiding this comment

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

This is not allowed in api functions:

Function declared public or api may not have private types

Copy link
Member

@wesm wesm left a comment

Choose a reason for hiding this comment

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

+1, sweet! I suppose at some point we'll want to set up an "example project" so that we can test these more easily in development

@asfgit asfgit closed this in ad57ea8 Jul 11, 2017
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.

None yet

3 participants