-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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-420: Align DATE type with Java implementation #238
Conversation
Change-Id: I2dc9e848f5bed9d717477792459dde6ea839b341
Things to do:
|
Why would we need more than |
See the ticket https://issues.apache.org/jira/browse/ARROW-413 The way DATE is implemented in Java is: "Here's a millisecond timestamp but please only look at the days". |
Change-Id: I6627e7be236b669600301ff6f073d79cef0f3ed0
Change-Id: Id38076d044006da7bfcf939832f82b345c7ca03b
Change-Id: Ice6cc2a8bf082edf20ab7950fae4bd10114f002e
@@ -369,6 +392,10 @@ inline Status ArrowSerializer<NPY_OBJECT>::Convert(std::shared_ptr<Array>* out) | |||
|
|||
// TODO: mask not supported here | |||
const PyObject** objects = reinterpret_cast<const PyObject**>(PyArray_DATA(arr_)); | |||
{ | |||
PyAcquireGIL lock; | |||
PyDateTime_IMPORT; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two things that bother me:
- I'd like to make this import only once for
libpyarrow
but I'm unsure how as it requires the GIL. - We don't seem to hold the GIL here but the functions called below suggest that we should.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right, we should acquire the GIL below before using any of the Py* methods. I'll create a JIRA about going through this module completely and making sure we're releasing the GIL on the Cython side and re-acquiring it in the appropriate places here
Ready for review. As |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1, creating follow up JIRA about GIL questions
@@ -369,6 +392,10 @@ inline Status ArrowSerializer<NPY_OBJECT>::Convert(std::shared_ptr<Array>* out) | |||
|
|||
// TODO: mask not supported here | |||
const PyObject** objects = reinterpret_cast<const PyObject**>(PyArray_DATA(arr_)); | |||
{ | |||
PyAcquireGIL lock; | |||
PyDateTime_IMPORT; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right, we should acquire the GIL below before using any of the Py* methods. I'll create a JIRA about going through this module completely and making sure we're releasing the GIL on the Cython side and re-acquiring it in the appropriate places here
Author: Korn, Uwe <Uwe.Korn@blue-yonder.com> Closes apache#238 from xhochy/PARQUET-867 and squashes the following commits: e9f79d3 [Korn, Uwe] Remove alt-space from code 5fe849d [Korn, Uwe] Address review comments fa7a1e0 [Korn, Uwe] Use Slice instead of offset,length d68e9db [Korn, Uwe] Update Arrow hash 61e3ac0 [Korn, Uwe] Use references instead of pointers d3c4ec6 [Korn, Uwe] Remove offset,length from public interface ec0577f [Korn, Uwe] PARQUET-867: Support writing sliced Arrow arrays
Author: Korn, Uwe <Uwe.Korn@blue-yonder.com> Closes apache#238 from xhochy/PARQUET-867 and squashes the following commits: e9f79d3 [Korn, Uwe] Remove alt-space from code 5fe849d [Korn, Uwe] Address review comments fa7a1e0 [Korn, Uwe] Use Slice instead of offset,length d68e9db [Korn, Uwe] Update Arrow hash 61e3ac0 [Korn, Uwe] Use references instead of pointers d3c4ec6 [Korn, Uwe] Remove offset,length from public interface ec0577f [Korn, Uwe] PARQUET-867: Support writing sliced Arrow arrays Change-Id: Ie00a05d627200e6f4919b2c2aaa3dae176a0b7c2
Author: Korn, Uwe <Uwe.Korn@blue-yonder.com> Closes apache#238 from xhochy/PARQUET-867 and squashes the following commits: e9f79d3 [Korn, Uwe] Remove alt-space from code 5fe849d [Korn, Uwe] Address review comments fa7a1e0 [Korn, Uwe] Use Slice instead of offset,length d68e9db [Korn, Uwe] Update Arrow hash 61e3ac0 [Korn, Uwe] Use references instead of pointers d3c4ec6 [Korn, Uwe] Remove offset,length from public interface ec0577f [Korn, Uwe] PARQUET-867: Support writing sliced Arrow arrays Change-Id: Ie00a05d627200e6f4919b2c2aaa3dae176a0b7c2
Author: Korn, Uwe <Uwe.Korn@blue-yonder.com> Closes apache#238 from xhochy/PARQUET-867 and squashes the following commits: e9f79d3 [Korn, Uwe] Remove alt-space from code 5fe849d [Korn, Uwe] Address review comments fa7a1e0 [Korn, Uwe] Use Slice instead of offset,length d68e9db [Korn, Uwe] Update Arrow hash 61e3ac0 [Korn, Uwe] Use references instead of pointers d3c4ec6 [Korn, Uwe] Remove offset,length from public interface ec0577f [Korn, Uwe] PARQUET-867: Support writing sliced Arrow arrays Change-Id: Ie00a05d627200e6f4919b2c2aaa3dae176a0b7c2
Author: Korn, Uwe <Uwe.Korn@blue-yonder.com> Closes apache#238 from xhochy/PARQUET-867 and squashes the following commits: e9f79d3 [Korn, Uwe] Remove alt-space from code 5fe849d [Korn, Uwe] Address review comments fa7a1e0 [Korn, Uwe] Use Slice instead of offset,length d68e9db [Korn, Uwe] Update Arrow hash 61e3ac0 [Korn, Uwe] Use references instead of pointers d3c4ec6 [Korn, Uwe] Remove offset,length from public interface ec0577f [Korn, Uwe] PARQUET-867: Support writing sliced Arrow arrays Change-Id: Ie00a05d627200e6f4919b2c2aaa3dae176a0b7c2
No description provided.