JabariBooker commented on a change in pull request #12014:
URL: https://github.com/apache/arrow/pull/12014#discussion_r794894926
##########
File path: cpp/src/arrow/testing/random.cc
##########
@@ -772,12 +789,42 @@ std::shared_ptr<Array>
RandomArrayGenerator::ArrayOf(const Field& field, int64_t
}
GENERATE_INTEGRAL_CASE_VIEW(Int32Type, Date32Type);
- GENERATE_INTEGRAL_CASE_VIEW(Int64Type, Date64Type);
GENERATE_INTEGRAL_CASE_VIEW(Int64Type, TimestampType);
- GENERATE_INTEGRAL_CASE_VIEW(Int32Type, Time32Type);
- GENERATE_INTEGRAL_CASE_VIEW(Int64Type, Time64Type);
GENERATE_INTEGRAL_CASE_VIEW(Int32Type, MonthIntervalType);
+ case Type::type::DATE64: {
+ using c_type = typename Date64Type::c_type;
+ constexpr c_type kFullDayMillis = 1000 * 60 * 60 * 24;
+ constexpr c_type min_value = std::numeric_limits<c_type>::min() /
kFullDayMillis;
+ constexpr c_type max_value = std::numeric_limits<c_type>::max() /
kFullDayMillis;
Review comment:
As far as I understand, negative values for Date64Type should be
permitted.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]