rok commented on a change in pull request #10598: URL: https://github.com/apache/arrow/pull/10598#discussion_r662137781
########## File path: cpp/src/arrow/compute/api_scalar.h ########## @@ -216,6 +216,19 @@ struct ARROW_EXPORT ProjectOptions : public FunctionOptions { std::vector<std::shared_ptr<const KeyValueMetadata>> field_metadata; }; +struct ARROW_EXPORT DayOfWeekOptions : public FunctionOptions { + explicit DayOfWeekOptions(bool one_based_numbering, uint32_t week_start) + : one_based_numbering(one_based_numbering), week_start(week_start) {} Review comment: I've added this: ```C++ if (week_start < 1 || 7 < week_start) { week_start = 1; } ``` However raising would be better I suppose? ```C++ throw std::invalid_argument("week_start must follow ISO convention (Monday=1, Sunday=7). Got week_start=" + std::to_string(week_start)); ``` -- 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