[
https://issues.apache.org/jira/browse/ARROW-1756?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16236072#comment-16236072
]
ASF GitHub Bot commented on ARROW-1756:
---------------------------------------
wesm commented on a change in pull request #1276: ARROW-1756: [Python] Fix
large file read/write error on Mac
URL: https://github.com/apache/arrow/pull/1276#discussion_r148586732
##########
File path: cpp/src/arrow/io/file.cc
##########
@@ -246,31 +246,55 @@ static inline Status FileRead(int fd, uint8_t* buffer,
int64_t nbytes,
}
*bytes_read = static_cast<int64_t>(_read(fd, buffer,
static_cast<uint32_t>(nbytes)));
#else
- *bytes_read = static_cast<int64_t>(read(fd, buffer,
static_cast<size_t>(nbytes)));
+ int64_t n = 0;
+ int64_t N = nbytes;
Review comment:
Since `N` is never changed, just use `nbytes`? Maybe make it `const int64_t
nbytes` in the function arguments for good measure
----------------------------------------------------------------
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:
[email protected]
> [Python] Observed int32 overflow in Feather write/read path
> -----------------------------------------------------------
>
> Key: ARROW-1756
> URL: https://issues.apache.org/jira/browse/ARROW-1756
> Project: Apache Arrow
> Issue Type: Bug
> Components: Python
> Reporter: Wes McKinney
> Assignee: Licht Takeuchi
> Priority: Major
> Labels: pull-request-available
> Fix For: 0.8.0
>
>
> See downstream report
> https://github.com/wesm/feather/issues/321
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)