You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2021/11/30 20:50:07 UTC

[GitHub] [arrow] lidavidm commented on a change in pull request #11818: ARROW-14822: [C++] Implement floor/ceil/round for temporal objects

lidavidm commented on a change in pull request #11818:
URL: https://github.com/apache/arrow/pull/11818#discussion_r759648779



##########
File path: cpp/src/arrow/compute/api_scalar.h
##########
@@ -108,6 +108,32 @@ class ARROW_EXPORT RoundToMultipleOptions : public FunctionOptions {
   RoundMode round_mode;
 };
 
+class ARROW_EXPORT RoundTemporalOptions : public FunctionOptions {
+ public:
+  enum Ambiguous { AMBIGUOUS_RAISE, AMBIGUOUS_EARLIEST, AMBIGUOUS_LATEST };
+  enum Nonexistent { NONEXISTENT_RAISE, NONEXISTENT_EARLIEST, NONEXISTENT_LATEST };
+
+  explicit RoundTemporalOptions(std::string frequency = "day",

Review comment:
       I realize this is just a draft :) that said, should be an enum as well?

##########
File path: cpp/src/arrow/compute/api_scalar.cc
##########
@@ -228,6 +268,12 @@ static auto kRoundOptionsType = GetFunctionOptionsType<RoundOptions>(
 static auto kRoundToMultipleOptionsType = GetFunctionOptionsType<RoundToMultipleOptions>(
     DataMember("multiple", &RoundToMultipleOptions::multiple),
     DataMember("round_mode", &RoundToMultipleOptions::round_mode));
+static auto kRoundTemporalOptionsType = GetFunctionOptionsType<RoundTemporalOptions>(

Review comment:
       nit: another contributor just alphabetized these, so maybe try to preserve that (same goes below).




-- 
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-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org