-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Support for Binaryview and StringView types #367
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -443,7 +443,9 @@ enum ArrowType { | |
NANOARROW_TYPE_LARGE_STRING, | ||
NANOARROW_TYPE_LARGE_BINARY, | ||
NANOARROW_TYPE_LARGE_LIST, | ||
NANOARROW_TYPE_INTERVAL_MONTH_DAY_NANO | ||
NANOARROW_TYPE_INTERVAL_MONTH_DAY_NANO, | ||
NANOARROW_TYPE_BINARY_VIEW, | ||
NANOARROW_TYPE_STRING_VIEW, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this ArrowType enum meant to be stable? (i.e. can I only add new types at the end, or can I put them at a more logical place in the list?) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think it's probably best to put it at the end to keep the existing values (we can always rearrange them in places where they're more likely to be seen). |
||
}; | ||
|
||
/// \brief Get a string value of an enum ArrowType value | ||
|
@@ -482,10 +484,14 @@ static inline const char* ArrowTypeString(enum ArrowType type) { | |
return "double"; | ||
case NANOARROW_TYPE_STRING: | ||
return "string"; | ||
case NANOARROW_TYPE_STRING_VIEW: | ||
return "string_view"; | ||
case NANOARROW_TYPE_BINARY: | ||
return "binary"; | ||
case NANOARROW_TYPE_FIXED_SIZE_BINARY: | ||
return "fixed_size_binary"; | ||
case NANOARROW_TYPE_BINARY_VIEW: | ||
return "binary_view"; | ||
case NANOARROW_TYPE_DATE32: | ||
return "date32"; | ||
case NANOARROW_TYPE_DATE64: | ||
|
@@ -784,6 +790,10 @@ struct ArrowArrayView { | |
/// type_id == union_type_id_map[128 + child_index]. This value may be | ||
/// NULL in the case where child_id == type_id. | ||
int8_t* union_type_id_map; | ||
|
||
int64_t n_varidic_buffers; | ||
int64_t* variadic_buffer_sizes; | ||
const void** variadic_buffers; | ||
}; | ||
|
||
// Used as the private data member for ArrowArrays allocated here and accessed | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
...I think?