lidavidm commented on code in PR #14663: URL: https://github.com/apache/arrow/pull/14663#discussion_r1035921481
########## cpp/src/arrow/dataset/scanner.h: ########## @@ -243,10 +250,17 @@ struct ARROW_DS_EXPORT ScanV2Options : public compute::ExecNodeOptions { /// one fragment at a time. int32_t fragment_readahead = kDefaultFragmentReadahead; /// \brief Options specific to the file format - FragmentScanOptions* format_options; + const FragmentScanOptions* format_options = NULLPTR; /// \brief Utility method to get a selection representing all columns in a dataset - static std::vector<FieldPath> AllColumns(const Dataset& dataset); + static std::vector<FieldPath> AllColumns(const Schema& dataset_schema); + + /// \brief Utility method to add fields needed for the current filter + /// + /// This method adds any fields that are needed by `filter` which are not already + /// included in the list of columns. Any new fields added will be added to the end + /// in no particular order. + static Status AddFieldsNeededForFilter(ScanV2Options* options); Review Comment: Oops, sorry, I missed this. The reasoning makes sense. I suppose if it's meant to be an immutable POD, then the latter method makes more sense to me. But that's kind of a nit. -- 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: github-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org