Struct datafusion::test_util::parquet::TestParquetFile
source · pub struct TestParquetFile { /* private fields */ }
Expand description
a ParquetFile that has been created for testing.
Implementations§
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 ParquetExec
with the specified options.
If maybe_filter
is non-None, the ParquetExec 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)
(ParquetExec)
Otherwise if maybe_filter
is None, return just a ParquetExec
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 ParquetExec 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
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