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



##########
File path: cpp/src/arrow/array/array_primitive.h
##########
@@ -108,11 +108,11 @@ class ARROW_EXPORT DayTimeIntervalArray : public 
PrimitiveArray {
   // For compatibility with Take kernel.
   TypeClass::DayMilliseconds GetView(int64_t i) const { return GetValue(i); }
 
-  int32_t byte_width() const { return sizeof(TypeClass::DayMilliseconds); }
-
   const uint8_t* raw_values() const { return raw_values_ + data_->offset * 
byte_width(); }
 
  protected:
+  static constexpr int32_t byte_width() { return 
sizeof(TypeClass::DayMilliseconds); }

Review comment:
       Well, it was public so could be used by anybody really. I'm ok with not 
making the public API too plethoric but this seems a rather useful function 
(and trivial to maintain).




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

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


Reply via email to