pub struct PushdownAdapter<S> { /* private fields */ }Expand description
Wraps a LookupSource that doesn’t support pushdown.
Predicates that can be pushed down (according to SourceCapabilities)
are forwarded to the inner source. Remaining predicates are evaluated
locally after fetching results using Arrow SIMD filtering.
Implementations§
Source§impl<S: LookupSource> PushdownAdapter<S>
impl<S: LookupSource> PushdownAdapter<S>
Sourcepub fn new(inner: S, column_capabilities: SourceCapabilities) -> Self
pub fn new(inner: S, column_capabilities: SourceCapabilities) -> Self
Create a new adapter.
inner— the underlying sourcecolumn_capabilities— per-column pushdown capabilities used bysplit_predicates
Trait Implementations§
Source§impl<S: LookupSource> LookupSource for PushdownAdapter<S>
impl<S: LookupSource> LookupSource for PushdownAdapter<S>
Source§async fn query(
&self,
keys: &[&[u8]],
predicates: &[Predicate],
projection: &[ColumnId],
) -> Result<Vec<Option<RecordBatch>>, LookupError>
async fn query( &self, keys: &[&[u8]], predicates: &[Predicate], projection: &[ColumnId], ) -> Result<Vec<Option<RecordBatch>>, LookupError>
Query the source by keys, predicates, and/or projection. Read more
Source§fn capabilities(&self) -> LookupSourceCapabilities
fn capabilities(&self) -> LookupSourceCapabilities
Capabilities this source advertises.
Source§fn source_name(&self) -> &str
fn source_name(&self) -> &str
Source name for logging and metrics.
Source§fn estimated_row_count(&self) -> Option<u64>
fn estimated_row_count(&self) -> Option<u64>
Optional row count estimate for query planning.
Source§fn health_check(&self) -> impl Future<Output = Result<(), LookupError>> + Send
fn health_check(&self) -> impl Future<Output = Result<(), LookupError>> + Send
Health check. Default: always healthy.
Auto Trait Implementations§
impl<S> Freeze for PushdownAdapter<S>where
S: Freeze,
impl<S> RefUnwindSafe for PushdownAdapter<S>where
S: RefUnwindSafe,
impl<S> Send for PushdownAdapter<S>where
S: Send,
impl<S> Sync for PushdownAdapter<S>where
S: Sync,
impl<S> Unpin for PushdownAdapter<S>where
S: Unpin,
impl<S> UnsafeUnpin for PushdownAdapter<S>where
S: UnsafeUnpin,
impl<S> UnwindSafe for PushdownAdapter<S>where
S: UnwindSafe,
Blanket Implementations§
§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Returns the layout of the type.
Source§impl<T> LookupSourceDyn for Twhere
T: LookupSource,
impl<T> LookupSourceDyn for Twhere
T: LookupSource,
Source§fn query_batch<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
keys: &'life1 [&'life2 [u8]],
predicates: &'life3 [Predicate],
projection: &'life4 [u32],
) -> Pin<Box<dyn Future<Output = Result<Vec<Option<RecordBatch>>, LookupError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
T: 'async_trait,
fn query_batch<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
keys: &'life1 [&'life2 [u8]],
predicates: &'life3 [Predicate],
projection: &'life4 [u32],
) -> Pin<Box<dyn Future<Output = Result<Vec<Option<RecordBatch>>, LookupError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
T: 'async_trait,
Query the source by keys, predicates, and/or projection.