Uh oh!
There was an error while loading. Please reload this page.
ARROW-6084: [Python] Support LargeList - #4979
Conversation
8ccd61f to
b5ae30cCompareThere was a problem hiding this comment.
It's not possible to have this subclass ListValue to reduce code duplication? (getitem, iter, as_py look the same)
There was a problem hiding this comment.
The problem is that the C++ types are different (e.g. ListArray vs. LargeListArray), and those need to be compile-time constants for Cython.
There was a problem hiding this comment.
Code like this makes me wish for some kind of macro system in Cython.
jorisvandenbossche
commented
Aug 2, 2019
Again, while trying it out this branch, I noticed some oddities. But now they are certainly not related to the code in this PR, as they also hold for non-large ListType. When creating an array from offsets and values in python, there is no validation of the offsets that it starts with 0 and ends with the length of the array (but is that required? the docs seem to indicate that: https://github.com/apache/arrow/blob/master/docs/source/format/Layout.rst#list-type ("The first value in the offsets array is 0, and the last element is the length of the values array."). I understand that in C++ the main constructors are not safe, and as the caller you need to ensure that the data is correct or call a safe (slower) constructor. But do we want to use the unsafe / fast constructors without validation in Python as default as well? |
jorisvandenbossche
commented
Aug 2, 2019
Ah, I see that in Python a validation function is exposed, and this actually raises: Do we want to call that by default in the creation method? |
pitrou
commented
Aug 5, 2019
On the C++ side indeed, calling validation for each constructor would be expensive. We can adopt a different strategy for Python. Can you open a JIRA about that? |
jorisvandenbossche
commented
Aug 5, 2019
e87eef5 to
3c38574Comparepitrou
commented
Aug 6, 2019
@wesm Do you want to take a look here or can I merge as-is? (assuming the R AppVeyor failure isn't related) |
3c38574 to
4266ea2Comparepitrou
commented
Aug 6, 2019
Rebased. |
codecov-io
commented
Aug 6, 2019
Codecov Report
@@ Coverage Diff @@## master #4979 +/- ##
==========================================
+ Coverage 87.57% 89.17% +1.6%
==========================================
Files 1005 727 -278 Lines 143560 103008 -40552 Branches 1418 0 -1418 ==========================================
- Hits 125720 91862 -33858 + Misses 17478 11146 -6332 + Partials 362 0 -362
Continue to review full report at Codecov.
|
wesm
commented
Aug 6, 2019
Taking a look |
There was a problem hiding this comment.
Code like this makes me wish for some kind of macro system in Cython.
No description provided.