wgtmac commented on code in PR #14806:
URL: https://github.com/apache/arrow/pull/14806#discussion_r1037818902


##########
cpp/src/arrow/adapters/orc/adapter.cc:
##########
@@ -217,6 +217,8 @@ class ORCFileReader::Impl {
 
   int64_t NumberOfRows() { return 
static_cast<int64_t>(reader_->getNumberOfRows()); }
 
+  int64_t NumberOfRows(int64_t stripe) { return stripes_[stripe].num_rows; }

Review Comment:
   Should we rename it to `NumberOfRowsInStripe` to avoid unintentional 
overloading?



##########
cpp/src/arrow/adapters/orc/adapter.cc:
##########
@@ -217,6 +217,8 @@ class ORCFileReader::Impl {
 
   int64_t NumberOfRows() { return 
static_cast<int64_t>(reader_->getNumberOfRows()); }
 
+  int64_t NumberOfRows(int64_t stripe) { return stripes_[stripe].num_rows; }

Review Comment:
   In addition, it is better to validate `stripe` and throw if out of range.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to