pub struct TestParquetFile {
path: PathBuf,
schema: SchemaRef,
object_store_url: ObjectStoreUrl,
object_meta: ObjectMeta,
}Expand description
a ParquetFile that has been created for testing.
Fields§
§path: PathBuf§schema: SchemaRef§object_store_url: ObjectStoreUrl§object_meta: ObjectMetaImplementations§
Source§impl TestParquetFile
impl TestParquetFile
Sourcepub fn try_new(
path: PathBuf,
props: WriterProperties,
batches: impl IntoIterator<Item = RecordBatch>,
) -> Result<Self>
pub fn try_new( path: PathBuf, props: WriterProperties, batches: impl IntoIterator<Item = RecordBatch>, ) -> Result<Self>
Creates a new parquet file at the specified location with the given properties
Source§impl TestParquetFile
impl TestParquetFile
Sourcepub async fn create_scan(
&self,
ctx: &SessionContext,
maybe_filter: Option<Expr>,
) -> Result<Arc<dyn ExecutionPlan>>
pub async fn create_scan( &self, ctx: &SessionContext, maybe_filter: Option<Expr>, ) -> Result<Arc<dyn ExecutionPlan>>
Return a DataSourceExec with the specified options.
If maybe_filter is non-None, the DataSourceExec will be filtered using
the given expression, and this method will return the same plan that DataFusion
will make with a pushed down predicate followed by a filter:
(FilterExec)
(DataSourceExec)Otherwise if maybe_filter is None, return just a DataSourceExec
Sourcepub fn parquet_metrics(plan: &Arc<dyn ExecutionPlan>) -> Option<MetricsSet>
pub fn parquet_metrics(plan: &Arc<dyn ExecutionPlan>) -> Option<MetricsSet>
Retrieve metrics from the parquet exec returned from create_scan
Recursively searches for DataSourceExec and returns the metrics on the first one it finds
Auto Trait Implementations§
impl Freeze for TestParquetFile
impl RefUnwindSafe for TestParquetFile
impl Send for TestParquetFile
impl Sync for TestParquetFile
impl Unpin for TestParquetFile
impl UnwindSafe for TestParquetFile
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> 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