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 2022/01/03 18:54:11 UTC

[GitHub] [arrow] pitrou commented on a change in pull request #12014: ARROW-10924: [C++] Validate temporal data in ValidateArrayFull

pitrou commented on a change in pull request #12014:
URL: https://github.com/apache/arrow/pull/12014#discussion_r777648679



##########
File path: cpp/src/arrow/array/validate.cc
##########
@@ -166,6 +166,80 @@ struct ValidateArrayImpl {
     return Status::OK();
   }
 
+  Status Visit(const Date64Type& type) {
+    RETURN_NOT_OK(ValidateFixedWidthBuffers());
+
+    using c_type = typename Date64Type::c_type;
+    if (full_validation) {
+      constexpr c_type kFullDay = 1000 * 60 * 60 * 24;
+      return VisitArrayDataInline<Date64Type>(
+          data,
+          [&](c_type date) {
+            if (date % kFullDay != 0) {
+              return Status::Invalid(type, date,
+                                     "ms does not represent a whole number of days");

Review comment:
       I _think_ it will be "Date64Type1234ms does not represent a whole number of days" (note the missing space: whitespace is not implicitly inserted between elements).




-- 
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