pub struct DuckDynamicTable { /* private fields */ }Expand description
动态结果集:bind 阶段算出的 schema + 行迭代器。
A dynamic result table: the schema computed during bind plus the row iterator.
它就是用户 bind 函数的返回值(见
DynamicTableFunctionAdapter):bind 负责「读外部
元数据、给出 schema、造出迭代器」,scan 负责按 schema 批量写出。
This is what a user bind function returns (see
DynamicTableFunctionAdapter): bind reads the external
metadata, publishes the schema and builds the iterator; scan writes rows out according to that
schema.
Implementations§
Source§impl DuckDynamicTable
impl DuckDynamicTable
Sourcepub fn new(schema: DuckResultSchema, rows: DuckDynamicIterator) -> Self
pub fn new(schema: DuckResultSchema, rows: DuckDynamicIterator) -> Self
由 schema 与行迭代器构造结果集。
Builds a result table from a schema and a row iterator.
Sourcepub fn schema(&self) -> &DuckResultSchema
pub fn schema(&self) -> &DuckResultSchema
输出 schema。
The output schema.
Sourcepub fn into_parts(self) -> (DuckResultSchema, DuckDynamicIterator)
pub fn into_parts(self) -> (DuckResultSchema, DuckDynamicIterator)
拆成 (schema, 行迭代器),供适配层放进 scan 状态。
Splits into (schema, row iterator) so the adapter can move them into the scan state.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for DuckDynamicTable
impl !Sync for DuckDynamicTable
impl !UnwindSafe for DuckDynamicTable
impl Freeze for DuckDynamicTable
impl Send for DuckDynamicTable
impl Unpin for DuckDynamicTable
impl UnsafeUnpin for DuckDynamicTable
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
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