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:16:33 UTC

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

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



##########
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:
       The status would read something like: "Date64Type 1234ms does not represent a whole number of days" which should be grammatically correct. 




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