rok commented on a change in pull request #11990: URL: https://github.com/apache/arrow/pull/11990#discussion_r771830498
########## File path: cpp/src/arrow/compute/api_scalar.h ########## @@ -1024,6 +1024,18 @@ Result<Datum> Month(const Datum& values, ExecContext* ctx = NULLPTR); ARROW_EXPORT Result<Datum> Day(const Datum& values, ExecContext* ctx = NULLPTR); +/// \brief DateStruct returns a struct containing the Year, Month and Day value for +/// each element of `values`. +/// +/// \param[in] values input to extract Year/Month/Day from Review comment: ```suggestion /// \param[in] values input to extract (year, month, day) struct from ``` ########## File path: cpp/src/arrow/compute/kernels/scalar_temporal_unary.cc ########## @@ -185,6 +191,98 @@ struct Day { Localizer localizer_; }; +// ---------------------------------------------------------------------- +// Extract year/month/day from temporal types Review comment: ```suggestion // Extract (year, month, day) struct from temporal types ``` ########## File path: cpp/src/arrow/compute/kernels/scalar_temporal_unary.cc ########## @@ -833,6 +931,13 @@ const FunctionDoc day_doc{ "cannot be found in the timezone database."), {"values"}}; +const FunctionDoc date_struct_doc{ + "Extract year/month/day", Review comment: ```suggestion "Extract (year, month, day) struct", ``` ########## File path: cpp/src/arrow/compute/api_scalar.h ########## @@ -1024,6 +1024,18 @@ Result<Datum> Month(const Datum& values, ExecContext* ctx = NULLPTR); ARROW_EXPORT Result<Datum> Day(const Datum& values, ExecContext* ctx = NULLPTR); +/// \brief DateStruct returns a struct containing the Year, Month and Day value for +/// each element of `values`. +/// +/// \param[in] values input to extract Year/Month/Day from +/// \param[in] ctx the function execution context, optional +/// \return the resulting datum +/// +/// \since 6.1.0 Review comment: ```suggestion /// \since 7.0.0 ``` -- 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