pub struct TableScan { /* private fields */ }Expand description
TableScan: a leaf operator that drains its RowSource.
Emits batches of at most DEFAULT_BATCH_SIZE rows. Idempotent
open / close so the operator can be re-opened in tests.
Implementations§
Source§impl TableScan
impl TableScan
pub fn new(source: Box<dyn RowSource>) -> Self
pub fn from_rows(schema: Vec<String>, rows: Vec<ResultRow>) -> Self
pub fn from_typed_rows( schema: Vec<String>, types: Vec<Option<ColumnType>>, rows: Vec<ResultRow>, ) -> Self
pub fn from_rows_with_schema(schema: RowSchema, rows: Vec<ResultRow>) -> Self
pub fn from_physical_rows(schema: RowSchema, rows: Vec<PhysicalRow>) -> Self
Trait Implementations§
Source§impl PhysicalOperator for TableScan
impl PhysicalOperator for TableScan
Source§fn row_schema(&self) -> &RowSchema
fn row_schema(&self) -> &RowSchema
Complete logical-to-physical row layout emitted by this operator. Every
Batch returned by Self::next must carry this exact schema; operators must reject a child that violates that invariant.Source§fn estimated_cardinality(&self) -> Option<u64>
fn estimated_cardinality(&self) -> Option<u64>
Planner/runtime cardinality estimate for choosing physical strategies.
None means the operator cannot provide a useful estimate. The value
is advisory rather than a correctness bound.Source§fn output_ordering(&self) -> &[PhysicalOrder]
fn output_ordering(&self) -> &[PhysicalOrder]
Leading output ordering known to be preserved by this operator.
Source§fn consume_into_aggregate(
&mut self,
executor: &mut dyn AggregateExecutor,
) -> ExecResult<bool>
fn consume_into_aggregate( &mut self, executor: &mut dyn AggregateExecutor, ) -> ExecResult<bool>
Let a leaf consume its native projected rows directly into an
aggregate executor. Returning
false promises that no input was
consumed, so the caller can fall back to ordinary Batch pulls.fn open(&mut self) -> ExecResult<()>
fn next(&mut self) -> ExecResult<Option<Batch>>
fn close(&mut self) -> ExecResult<()>
Auto Trait Implementations§
impl !RefUnwindSafe for TableScan
impl !Sync for TableScan
impl !UnwindSafe for TableScan
impl Freeze for TableScan
impl Send for TableScan
impl Unpin for TableScan
impl UnsafeUnpin for TableScan
Blanket Implementations§
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> ErasedDestructor for Twhere
T: 'static,
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