ASF GitHub Bot commented on ARROW-2328:

Adriandorr commented on a change in pull request #1784: ARROW-2328: [C++] Fixed 
and unit tested feather writing with slice
URL: https://github.com/apache/arrow/pull/1784#discussion_r180032970

 File path: cpp/src/arrow/ipc/test-common.h
 @@ -223,15 +223,17 @@ Status MakeRandomBinaryArray(int64_t length, bool 
include_nulls, MemoryPool* poo
     if (include_nulls && values_index == 0) {
     } else {
-      const std::string& value = values[values_index];
+      const std::string value =
+          i < int64_t(values.size()) ? values[values_index] : 
 Review comment:
   The original random strings were not very random, just a repetition of the 
same few strings. I admit the new ones aren't very random either, in particular 
there are no repetitions which you would expect in a in real data. I probably 
should have added a new method (MakeRangeBinaryArray?).
   Of course you don't want true random data either in a test.
   If I revert the change I wouldn't be confident that my tests are still 
testing anything, the repetition might just align in a lucky pattern.
   You ok with leaving it, I think it is better than the previous code?

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:

> Writing a slice with feather ignores the offset
> -----------------------------------------------
>                 Key: ARROW-2328
>                 URL: https://issues.apache.org/jira/browse/ARROW-2328
>             Project: Apache Arrow
>          Issue Type: Bug
>          Components: C++
>    Affects Versions: 0.8.0
>            Reporter: Adrian
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 0.10.0
>   Original Estimate: 0.5h
>  Remaining Estimate: 0.5h
> Writing a slice from row n of length m of an array to feather would write the 
> first m rows, instead of the rows starting at n.
> The null bitmap also ends up misaligned. Also tested and fixed in the pull 
> request below.
>  I've created a pull request with tests and fix here: 
> [Pullrequest#1766|https://github.com/apache/arrow/pull/1766]

This message was sent by Atlassian JIRA

Reply via email to