ARROW-45: [Python] Add unnest/flatten function for List types#2757
ARROW-45: [Python] Add unnest/flatten function for List types#2757kszucs wants to merge 4 commits intoapache:masterfrom
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2757 +/- ##
==========================================
+ Coverage 87.65% 88.59% +0.94%
==========================================
Files 403 342 -61
Lines 61483 57728 -3755
==========================================
- Hits 53891 51145 -2746
+ Misses 7520 6583 -937
+ Partials 72 0 -72
Continue to review full report at Codecov.
|
wesm
left a comment
There was a problem hiding this comment.
Not sure the C++ changes are needed. In my comment on March 14 https://issues.apache.org/jira/browse/ARROW-45?focusedCommentId=16398663&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-16398663 what I intended (but was too overwhelmed with the 0.9.0 release as I recall to comment further) was to have a flatten kernel to use in computational pipelines. I created ARROW-3520 about this
cpp/src/arrow/array.h
Outdated
| std::shared_ptr<Array> values() const; | ||
|
|
||
| /// \brief Unnests the Array by one level | ||
| std::shared_ptr<Array> Flatten() const { return values(); } |
There was a problem hiding this comment.
I'm not really sure what's the purpose of adding this redundant API. Really we need to implement a flatten kernel but having "flatten" available in Python is useful. Suggest removing this
There was a problem hiding this comment.
cpp/src/arrow/array-test.cc
Outdated
|
|
||
| // checks | ||
| auto flattened = result_->Flatten(); | ||
| ASSERT_TRUE(flattened->Equals(expected)); |
|
+1, merging |
No description provided.