pub fn read_filter_table_schema(&self, columns: Selection<'_>) -> Result<Schema> {
        // Validate columns exist in table.
        let table_meta = self.table.meta();
        if let Selection::Some(cols) = columns {
            for column_name in cols {
                if !table_meta.has_column(column_name) {
                    return ColumnDoesNotExist {
                        column_name: column_name.to_string(),
                        table_name: self.table.name().to_string(),
                    }
                    .fail();
                }
            }
        }

        // Build a table schema
        Schema::try_from(&ResultSchema {
            select_columns: match columns {
                Selection::All => table_meta.schema_for_all_columns(),
                Selection::Some(column_names) => table_meta.schema_for_column_names(column_names),
            },
            ..ResultSchema::default()
        })
        .context(TableSchemaError)
    }
/// Returns a schema object for a `read_filter` operation using the provided
/// column selection. An error is returned if the specified columns do not
/// exist.
Returns a schema object for a `read_filter` operation using the provided
column selection. An error is returned if the specified columns do not
exist.
Returns a schema object for a ` read_filter ` operation using the provided column selection . An error is returned if the specified columns do not exist .
pub fn read_filter_table_schema(&self, columns: Selection<'_>) -> Result<Schema> {
        // Validate columns exist in table.
        let table_meta = self.table.meta();
        if let Selection::Some(cols) = columns {
            for column_name in cols {
                if !table_meta.has_column(column_name) {
                    return ColumnDoesNotExist {
                        column_name: column_name.to_string(),
                        table_name: self.table.name().to_string(),
                    }
                    .fail();
                }
            }
        }
        // Build a table schema
        Schema::try_from(&ResultSchema {
            select_columns: match columns {
                Selection::All => table_meta.schema_for_all_columns(),
                Selection::Some(column_names) => table_meta.schema_for_column_names(column_names),
            },
            ..ResultSchema::default()
        })
        .context(TableSchemaError)
    }
pub fn read_filter_table_schema ( & self , columns : Selection < ' _ > ) -> Result < Schema > { // Validate columns exist in table. let table_meta = self . table . meta ( ) ; if let Selection :: Some ( cols ) = columns { for column_name in cols { if ! table_meta . has_column ( column_name ) { return ColumnDoesNotExist { column_name : column_name . to_string ( ) , table_name : self . table . name ( ) . to_string ( ) , } . fail ( ) ; } } } // Build a table schema Schema :: try_from ( & ResultSchema { select_columns : match columns { Selection :: All => table_meta . schema_for_all_columns ( ) , Selection :: Some ( column_names ) => table_meta . schema_for_column_names ( column_names ) , } , .. ResultSchema :: default ( ) } ) . context ( TableSchemaError ) }
Returns a schema object for a `read_filter` operation using the provided
column selection.
Returns a schema object for a ` read_filter ` operation using the provided column selection .
&self
columns
Selection<'_>
&self
columns
Selection<'_>