paleolimbot commented on code in PR #258:
URL: https://github.com/apache/arrow-nanoarrow/pull/258#discussion_r1266747800


##########
src/nanoarrow/nanoarrow_types.h:
##########
@@ -656,6 +672,19 @@ struct ArrowArrayPrivateData {
   int8_t union_type_id_is_child_index;
 };
 
+/// \brief A representation of an interval.
+struct ArrowInterval {
+  /// \brief The type of interval being used
+  enum ArrowIntervalUnit unit;
+
+  /// \brief Pointer containing the underlying data for the interval
+  union {
+    int32_t year_month;
+    struct ArrowIntervalDayTime day_time;
+    struct ArrowIntervalMonthDayNano month_day_nano;
+  } data;
+};

Review Comment:
   Ah, now I see `reinterpret_cast<const struct ArrowIntervalMonthDayNano*>` 
and friends. In #214 we opted to `memcpy()` instead of `reinterpret_cast<>` ( 
https://github.com/apache/arrow-nanoarrow/pull/214#discussion_r1223410268 ), 
although I'm aware we `reinterpret_cast<>` and make it easy for others to do so 
with the int/float/double primitives. I think the idea was to not continue that 
for anything more exotic than an `int64`.



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

Reply via email to