dojiong commented on issue #7845:
URL:
https://github.com/apache/arrow-datafusion/issues/7845#issuecomment-1770272743
Maybe add ExtensionType to Arrow's DataType is more naturely:
```rust
trait ExtensionType {
fn inner_type(&self) -> &DataType;
// ....
}
enum DataType {
Int8,
Utf8,
// ....
Extension(Arc<dyn ExtensionType>)
}
impl DataType {
fn raw_type(&self) -> &DataType {
let mut ty = self;
while let Self::Extension(ext) = ty {
ty = ext.inner_type();
}
ty
}
}
```
--
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]