jorisvandenbossche commented on a change in pull request #8507:
URL: https://github.com/apache/arrow/pull/8507#discussion_r512836332
##########
File path: cpp/src/arrow/dataset/file_parquet.h
##########
@@ -154,23 +154,27 @@ class ARROW_DS_EXPORT ParquetFileFragment : public
FileFragment {
Result<FragmentVector> SplitByRowGroup(const std::shared_ptr<Expression>&
predicate);
/// \brief Return the RowGroups selected by this fragment.
- const std::vector<int>& row_groups() const { return row_groups_; }
+ const std::vector<int>& row_groups() const {
+ if (row_groups_) return *row_groups_;
+ static std::vector<int> empty;
+ return empty;
Review comment:
Shouldn't this be a vector of <0, 1, 2, ..num_row_groups> ? Because if
`row_groups_` is not set, it's meaning all row groups?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]