This is an automated email from the ASF dual-hosted git repository.
github-bot pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow-nanoarrow.git
The following commit(s) were added to refs/heads/main by this push:
new d683836 Update dist/ for commit
5c3e149e68c3e461cdd47cff542119b35d646caa
d683836 is described below
commit d683836fb9d6c259e85ce00ce1b50c7f7b8397d6
Author: GitHub Actions <[email protected]>
AuthorDate: Wed Aug 2 01:30:24 2023 +0000
Update dist/ for commit 5c3e149e68c3e461cdd47cff542119b35d646caa
---
dist/nanoarrow.h | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)
diff --git a/dist/nanoarrow.h b/dist/nanoarrow.h
index dd1555f..666dea1 100644
--- a/dist/nanoarrow.h
+++ b/dist/nanoarrow.h
@@ -3320,6 +3320,33 @@ static inline struct ArrowBufferView
ArrowArrayViewGetBytesUnsafe(
return view;
}
+static inline void ArrowArrayViewGetIntervalUnsafe(struct ArrowArrayView*
array_view,
+ int64_t i, struct
ArrowInterval* out) {
+ const uint8_t* data_view = array_view->buffer_views[1].data.as_uint8;
+ switch (array_view->storage_type) {
+ case NANOARROW_TYPE_INTERVAL_MONTHS: {
+ const size_t size = sizeof(int32_t);
+ memcpy(&out->months, data_view + i * size, sizeof(int32_t));
+ break;
+ }
+ case NANOARROW_TYPE_INTERVAL_DAY_TIME: {
+ const size_t size = sizeof(int32_t) + sizeof(int32_t);
+ memcpy(&out->days, data_view + i * size, sizeof(int32_t));
+ memcpy(&out->ms, data_view + i * size + 4, sizeof(int32_t));
+ break;
+ }
+ case NANOARROW_TYPE_INTERVAL_MONTH_DAY_NANO: {
+ const size_t size = sizeof(int32_t) + sizeof(int32_t) + sizeof(int64_t);
+ memcpy(&out->months, data_view + i * size, sizeof(int32_t));
+ memcpy(&out->days, data_view + i * size + 4, sizeof(int32_t));
+ memcpy(&out->ns, data_view + i * size + 8, sizeof(int64_t));
+ break;
+ }
+ default:
+ break;
+ }
+}
+
static inline void ArrowArrayViewGetDecimalUnsafe(struct ArrowArrayView*
array_view,
int64_t i, struct
ArrowDecimal* out) {
i += array_view->offset;