Skip to content

Commit f547cbc

Browse files
authored
chore[vortex-array]: facilitate third-party ToArrowKernel implementations (#4237)
This commit has two changes that were required to write a third-party ToArrowKernel to convert vortex to dictionary arrays: 1. Re-exporting vortex-array::arrow::array publicly so that an ArrowArray can be constructed. 2. Support converting an arrow DictionaryType to a canonical DType (this is just the underlying values type). Signed-off-by: Alfonso Subiotto Marques <[email protected]>
1 parent d1c2d9c commit f547cbc

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

vortex-array/src/arrow/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ mod datum;
1414
mod iter;
1515
mod record_batch;
1616

17+
pub use array::*;
1718
pub use datum::*;
1819
pub use iter::*;
1920

vortex-dtype/src/arrow.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,9 @@ impl FromArrowType<(&DataType, Nullability)> for DType {
127127
List(Arc::new(Self::from_arrow(e.as_ref())), nullability)
128128
}
129129
DataType::Struct(f) => Struct(StructFields::from_arrow(f), nullability),
130+
DataType::Dictionary(_, value_type) => {
131+
Self::from_arrow((value_type.as_ref(), nullability))
132+
}
130133
_ => unimplemented!("Arrow data type not yet supported: {:?}", data_type),
131134
}
132135
}

0 commit comments

Comments
 (0)