pub struct TableScan { /* private fields */ }Expand description
Table scan.
Implementations§
Source§impl TableScan
impl TableScan
Sourcepub async fn plan_files(&self) -> Result<FileScanTaskStream>
pub async fn plan_files(&self) -> Result<FileScanTaskStream>
Returns a stream of FileScanTasks.
Sourcepub async fn to_arrow(
&self,
options: ArrowReaderOptions,
) -> Result<ArrowRecordBatchStream>
pub async fn to_arrow( &self, options: ArrowReaderOptions, ) -> Result<ArrowRecordBatchStream>
Returns an ArrowRecordBatchStream using the supplied reader settings.
Reader settings are independent of file planning. Unset data-file concurrency
uses execution-host parallelism; zero is treated as one.
TableScanBuilder::with_concurrency_limit only controls manifest planning.
let options = ArrowReaderOptions::builder()
.with_batch_size(1024)
.with_row_selection_enabled(true)
.with_parquet_options(
ParquetReadOptions::builder()
.with_metadata_size_hint(512 * 1024)
.build(),
)
.build();
let stream = table.scan().build()?.to_arrow(options).await?;When upgrading, move reader-setting calls from TableScanBuilder to
ArrowReaderOptions::builder() and pass the result to to_arrow(options).
Use to_arrow(Default::default()) for default settings. To preserve a
data-file concurrency bound previously set through the scan, set
with_data_file_concurrency_limit(limit) on the reader options explicitly.
Locally constructed readers accept the same options through
ArrowReaderBuilder::with_options, including Parquet I/O tuning.
This replaces the complete configuration. Configure individual settings
through the options builders; per-field setters on ArrowReaderBuilder
have been removed. ArrowReaderBuilder::with_parquet_options replaces
only the nested Parquet configuration.
Sourcepub fn column_names(&self) -> Option<&[String]>
pub fn column_names(&self) -> Option<&[String]>
Returns a reference to the column names of the table scan.
Sourcepub fn snapshot(&self) -> Option<&SnapshotRef>
pub fn snapshot(&self) -> Option<&SnapshotRef>
Returns a reference to the snapshot of the table scan.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TableScan
impl !RefUnwindSafe for TableScan
impl Send for TableScan
impl Sync for TableScan
impl Unpin for TableScan
impl UnsafeUnpin for TableScan
impl !UnwindSafe for TableScan
Blanket Implementations§
§impl<U> As for U
impl<U> As for U
§fn as_<T>(self) -> Twhere
T: CastFrom<U>,
fn as_<T>(self) -> Twhere
T: CastFrom<U>,
self to type T. The semantics of numeric casting with the as operator are followed, so <T as As>::as_::<U> can be used in the same way as T as U for numeric conversions. Read moreSource§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
§impl<T> Downcast for Twhere
T: AsAny + ?Sized,
impl<T> Downcast for Twhere
T: AsAny + ?Sized,
§fn downcast_ref<T>(&self) -> Option<&T>where
T: AsAny,
fn downcast_ref<T>(&self) -> Option<&T>where
T: AsAny,
Any.§fn downcast_mut<T>(&mut self) -> Option<&mut T>where
T: AsAny,
fn downcast_mut<T>(&mut self) -> Option<&mut T>where
T: AsAny,
Any.§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> ⓘ
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> ⓘ
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