mod errors;
mod extractors;
use arrow_array::RecordBatch;
use arrow_schema::SchemaRef;
pub use errors::KeyExtractError;
pub(crate) use extractors::{
map_view_err, projection_for_columns, projection_for_field, row_from_batch,
};
use crate::key::KeyRow;
pub trait KeyProjection: Send + Sync {
fn validate_schema(&self, schema: &SchemaRef) -> Result<(), KeyExtractError>;
fn key_schema(&self) -> SchemaRef;
fn key_indices(&self) -> &[usize];
fn project_view(
&self,
batch: &RecordBatch,
rows: &[usize],
) -> Result<Vec<KeyRow>, KeyExtractError>;
}