pub struct ScanMetadata {
pub scan_files: FilteredEngineData,
pub scan_file_transforms: Vec<Option<ExpressionRef>>,
}Expand description
ScanMetadata contains (1) a batch of FilteredEngineData specifying data files to be scanned
and (2) a vector of transforms (one transform per scan file) that must be applied to the data read
from those files.
Fields§
§scan_files: FilteredEngineDataFiltered engine data with one row per file to scan (and only selected rows should be scanned)
scan_file_transforms: Vec<Option<ExpressionRef>>Row-level transformations to apply to data read from files.
Each entry in this vector corresponds to a row in the scan_files data. The entry is an
optional expression that must be applied to convert the file’s data into the logical schema
expected by the scan:
Some(expr): Apply this expression to transform the data to matchScan::logical_schema().None: No transformation is needed; the data is already in the correct logical form.
Note: This vector can be indexed by row number, as rows masked by the selection vector will
have corresponding entries that will be None.
Implementations§
Source§impl ScanMetadata
Request that the kernel call a callback on each valid file that needs to be read for the
scan.
impl ScanMetadata
Request that the kernel call a callback on each valid file that needs to be read for the scan.
The arguments to the callback are:
context: an&mut contextargument. this can be anything that engine needs to pass through to each callscan_file: aScanFilestruct with all the information about the file
§Context
A note on the context. This can be any value the engine wants. This function takes ownership
of the passed arg, but then returns it, so the engine can repeatedly call visit_scan_files
with the same context.
§Example
let mut context = [my context];
for res in scan_metadata_iter { // scan metadata iterator from scan.scan_metadata()
let scan_metadata = res?;
context = scan_metadata.visit_scan_files(
context,
my_callback,
)?;
}pub fn visit_scan_files<T>( &self, context: T, callback: ScanCallback<T>, ) -> DeltaResult<T>
Trait Implementations§
Source§impl HasSelectionVector for ScanMetadata
impl HasSelectionVector for ScanMetadata
Source§fn has_selected_rows(&self) -> bool
fn has_selected_rows(&self) -> bool
internal-api only.Auto Trait Implementations§
impl Freeze for ScanMetadata
impl !RefUnwindSafe for ScanMetadata
impl Send for ScanMetadata
impl Sync for ScanMetadata
impl Unpin for ScanMetadata
impl UnsafeUnpin for ScanMetadata
impl !UnwindSafe for ScanMetadata
Blanket Implementations§
Source§impl<T> AsAny for T
impl<T> AsAny for T
Source§fn any_ref(&self) -> &(dyn Any + Sync + Send + 'static)
fn any_ref(&self) -> &(dyn Any + Sync + Send + 'static)
dyn Any reference to the object: Read moreSource§fn as_any(self: Arc<T>) -> Arc<dyn Any + Sync + Send>
fn as_any(self: Arc<T>) -> Arc<dyn Any + Sync + Send>
Arc<dyn Any> reference to the object: Read moreSource§fn into_any(self: Box<T>) -> Box<dyn Any + Sync + Send>
fn into_any(self: Box<T>) -> Box<dyn Any + Sync + Send>
Box<dyn Any>: Read moreSource§fn type_name(&self) -> &'static str
fn type_name(&self) -> &'static str
std::any::type_name, since Any does not provide it and
Any::type_id is useless as a debugging aid (its Debug is just a mess of hex digits).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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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 moreSource§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<KernelType, ArrowType> TryIntoArrow<ArrowType> for KernelTypewhere
ArrowType: TryFromKernel<KernelType>,
impl<KernelType, ArrowType> TryIntoArrow<ArrowType> for KernelTypewhere
ArrowType: TryFromKernel<KernelType>,
Source§fn try_into_arrow(self) -> Result<ArrowType, ArrowError>
fn try_into_arrow(self) -> Result<ArrowType, ArrowError>
default-engine-native-tls or default-engine-rustls or arrow-conversion) and crate feature arrow-conversion only.Source§impl<KernelType, ArrowType> TryIntoKernel<KernelType> for ArrowTypewhere
KernelType: TryFromArrow<ArrowType>,
impl<KernelType, ArrowType> TryIntoKernel<KernelType> for ArrowTypewhere
KernelType: TryFromArrow<ArrowType>,
Source§fn try_into_kernel(self) -> Result<KernelType, ArrowError>
fn try_into_kernel(self) -> Result<KernelType, ArrowError>
default-engine-native-tls or default-engine-rustls or arrow-conversion) and crate feature arrow-conversion only.