-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Description
Is your feature request related to a problem or challenge? Please describe what you are trying to do.
Extension types are annotated in field metadata. This works well with record batches, but when exporting/importing an array over the C data interface, the extension type metadata is lost.
The C++ implementation solves this by having an ExtensionType class and always exports that metadata over C data interface here:
Describe the solution you'd like
I'd propose adding a new enum variant to DataType:
struct ExtensionType {
name: String,
metadata: String,
storage_type: Box<DataType>,
}
enum DataType {
...
ExtensionType(ExtensionType)
}Then make sure the C data interface implementation handles exporting and importing this type.
Describe alternatives you've considered
We could add an extension type registry like C++, but that seems heavier than we really need.
Additional context
https://arrow.apache.org/docs/format/CDataInterface.html#extension-arrays
Previous discussions: