Skip to content

Commit e56574f

Browse files
a10yrobert3005
authored andcommitted
remove unused method
Signed-off-by: Andrew Duffy <andrew@a10y.dev>
1 parent 84e32a8 commit e56574f

2 files changed

Lines changed: 1 addition & 45 deletions

File tree

vortex-array/public-api.lock

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7368,8 +7368,6 @@ pub fn vortex_array::arrow::ArrowSession::register_exporter(&self, vortex_array:
73687368

73697369
pub fn vortex_array::arrow::ArrowSession::register_importer(&self, vortex_array::arrow::ArrowImportVTableRef)
73707370

7371-
pub fn vortex_array::arrow::ArrowSession::to_arrow_data_type(&self, &vortex_array::dtype::DType) -> vortex_error::VortexResult<arrow_schema::datatype::DataType>
7372-
73737371
pub fn vortex_array::arrow::ArrowSession::to_arrow_field(&self, &str, &vortex_array::dtype::DType) -> vortex_error::VortexResult<arrow_schema::field::Field>
73747372

73757373
pub fn vortex_array::arrow::ArrowSession::to_arrow_schema(&self, &vortex_array::dtype::DType) -> vortex_error::VortexResult<arrow_schema::schema::Schema>

vortex-array/src/arrow/session.rs

Lines changed: 1 addition & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -249,12 +249,8 @@ impl ArrowSession {
249249

250250
/// Build the Arrow [`Field`] for a Vortex [`DType`].
251251
///
252-
/// For [`DType::Extension`]s, plugins registered against the extension's Vortex Id
252+
/// For [`DType::Extension`]s, plugins registered against the extension's `Id`
253253
/// are tried in registration order; the first plugin to return `Some(field)` wins.
254-
/// If every registered plugin returns `None` (or none are registered) the field is
255-
/// built from [`Self::to_arrow_data_type`]. Container types ([`DType::List`],
256-
/// [`DType::FixedSizeList`], [`DType::Struct`]) recurse through this method so
257-
/// extension metadata on nested fields is preserved.
258254
pub fn to_arrow_field(&self, name: &str, dtype: &DType) -> VortexResult<Field> {
259255
// Handle the structural encodings, which may have recursive types
260256
match dtype {
@@ -304,44 +300,6 @@ impl ArrowSession {
304300
}
305301
}
306302

307-
/// Build the Arrow [`DataType`] for a Vortex [`DType`].
308-
///
309-
/// Recurses into container types so nested extension fields go through registered
310-
/// plugins; non-recursive, non-extension dtypes delegate to
311-
/// [`DType::to_arrow_dtype`]. Note that a bare [`DataType`] cannot carry Arrow
312-
/// extension metadata — for inference that needs `ARROW:extension:name` on the
313-
/// outermost node, use [`Self::to_arrow_field`] instead.
314-
pub fn to_arrow_data_type(&self, dtype: &DType) -> VortexResult<DataType> {
315-
Ok(match dtype {
316-
DType::Extension(ext) => {
317-
let mut data_type = None;
318-
for plugin in self.exporters_by_vortex(&ext.id()).iter() {
319-
if let Some(field) = plugin.to_arrow_field("", ext, self)? {
320-
data_type = Some(field.data_type().clone());
321-
break;
322-
}
323-
}
324-
match data_type {
325-
Some(dt) => dt,
326-
None => to_data_type_naive(dtype)?,
327-
}
328-
}
329-
DType::List(elem, _) => DataType::List(Arc::new(self.to_arrow_field("item", elem)?)),
330-
DType::FixedSizeList(elem, size, _) => {
331-
DataType::FixedSizeList(Arc::new(self.to_arrow_field("item", elem)?), *size as i32)
332-
}
333-
DType::Struct(struct_dtype, _) => {
334-
let mut fields = Vec::with_capacity(struct_dtype.names().len());
335-
for (name, field_dtype) in struct_dtype.names().iter().zip(struct_dtype.fields()) {
336-
fields.push(self.to_arrow_field(name.as_ref(), &field_dtype)?);
337-
}
338-
DataType::Struct(fields.into())
339-
}
340-
// Fallback,
341-
_ => to_data_type_naive(dtype)?,
342-
})
343-
}
344-
345303
/// Build the Arrow [`Schema`] for a Vortex top-level [`DType::Struct`], dispatching
346304
/// extension fields through registered export plugins for inference. Nested
347305
/// extensions are preserved via [`Self::to_arrow_field`].

0 commit comments

Comments
 (0)