Trait lance_arrow::schema::SchemaExt

source ·
pub trait SchemaExt {
    // Required methods
    fn try_with_column(&self, field: Field) -> Result<Schema, ArrowError>;
    fn try_with_column_at(
        &self,
        index: usize,
        field: Field,
    ) -> Result<Schema, ArrowError>;
    fn field_names(&self) -> Vec<&String>;
    fn without_column(&self, column_name: &str) -> Schema;
}
Expand description

Extends the functionality of arrow_schema::Schema.

Required Methods§

source

fn try_with_column(&self, field: Field) -> Result<Schema, ArrowError>

Create a new Schema with one extra field.

source

fn try_with_column_at( &self, index: usize, field: Field, ) -> Result<Schema, ArrowError>

source

fn field_names(&self) -> Vec<&String>

source

fn without_column(&self, column_name: &str) -> Schema

Implementations on Foreign Types§

source§

impl SchemaExt for Schema

source§

fn without_column(&self, column_name: &str) -> Schema

Project the schema to remove the given column.

This only works on top-level fields right now. If a field does not exist, the schema will be returned as is.

source§

fn try_with_column(&self, field: Field) -> Result<Schema, ArrowError>

source§

fn try_with_column_at( &self, index: usize, field: Field, ) -> Result<Schema, ArrowError>

source§

fn field_names(&self) -> Vec<&String>

Implementors§