pub struct OrcSource { /* private fields */ }Expand description
Execution plan for reading one or more ORC files.
Supports projection, limit pushdown, and stripe-level predicate pushdown. TODO: Add schema adapter support and column statistics pruning.
Implementations§
Source§impl OrcSource
impl OrcSource
Sourcepub fn new(table_schema: impl Into<TableSchema>) -> Self
pub fn new(table_schema: impl Into<TableSchema>) -> Self
Create a new OrcSource
Sourcepub fn with_read_options(self, read_options: OrcReadOptions) -> Self
pub fn with_read_options(self, read_options: OrcReadOptions) -> Self
Set read options for ORC scans.
Sourcepub fn read_options(&self) -> &OrcReadOptions
pub fn read_options(&self) -> &OrcReadOptions
Return the current read options.
Sourcepub fn with_predicate(&self, predicate: Arc<dyn PhysicalExpr>) -> Self
pub fn with_predicate(&self, predicate: Arc<dyn PhysicalExpr>) -> Self
Create a new OrcSource with a predicate filter
The predicate will be converted to an orc-rust Predicate and used for stripe-level filtering during file reads.
Sourcepub fn orc_predicate(&self) -> Option<&OrcPredicate>
pub fn orc_predicate(&self) -> Option<&OrcPredicate>
Get the orc-rust predicate (if conversion was successful)
Trait Implementations§
Source§impl FileSource for OrcSource
impl FileSource for OrcSource
Source§fn filter(&self) -> Option<Arc<dyn PhysicalExpr>>
fn filter(&self) -> Option<Arc<dyn PhysicalExpr>>
Returns the filter expression that will be applied during the file scan.
Source§fn create_file_opener(
&self,
object_store: Arc<dyn ObjectStore>,
base_config: &FileScanConfig,
partition: usize,
) -> Arc<dyn FileOpener>
fn create_file_opener( &self, object_store: Arc<dyn ObjectStore>, base_config: &FileScanConfig, partition: usize, ) -> Arc<dyn FileOpener>
Creates a
dyn FileOpener based on given parametersSource§fn with_batch_size(&self, batch_size: usize) -> Arc<dyn FileSource>
fn with_batch_size(&self, batch_size: usize) -> Arc<dyn FileSource>
Initialize new type with batch size configuration
Source§fn with_schema(&self, schema: TableSchema) -> Arc<dyn FileSource>
fn with_schema(&self, schema: TableSchema) -> Arc<dyn FileSource>
Initialize new instance with a new schema
Source§fn with_projection(&self, _config: &FileScanConfig) -> Arc<dyn FileSource>
fn with_projection(&self, _config: &FileScanConfig) -> Arc<dyn FileSource>
Initialize new instance with projection information
Source§fn with_statistics(&self, statistics: Statistics) -> Arc<dyn FileSource>
fn with_statistics(&self, statistics: Statistics) -> Arc<dyn FileSource>
Initialize new instance with projected statistics
Source§fn statistics(&self) -> Result<Statistics>
fn statistics(&self) -> Result<Statistics>
Return projected statistics
Source§fn metrics(&self) -> &ExecutionPlanMetricsSet
fn metrics(&self) -> &ExecutionPlanMetricsSet
Return execution plan metrics
Source§fn file_type(&self) -> &str
fn file_type(&self) -> &str
String representation of file source such as “csv”, “json”, “parquet”
Source§fn fmt_extra(&self, t: DisplayFormatType, f: &mut Formatter<'_>) -> Result
fn fmt_extra(&self, t: DisplayFormatType, f: &mut Formatter<'_>) -> Result
Format FileType specific information
Source§fn try_pushdown_filters(
&self,
filters: Vec<Arc<dyn PhysicalExpr>>,
_config: &ConfigOptions,
) -> Result<FilterPushdownPropagation<Arc<dyn FileSource>>>
fn try_pushdown_filters( &self, filters: Vec<Arc<dyn PhysicalExpr>>, _config: &ConfigOptions, ) -> Result<FilterPushdownPropagation<Arc<dyn FileSource>>>
Try to push down filters into this FileSource.
See
ExecutionPlan::handle_child_pushdown_result for more details.Source§fn repartitioned(
&self,
target_partitions: usize,
repartition_file_min_size: usize,
output_ordering: Option<LexOrdering>,
config: &FileScanConfig,
) -> Result<Option<FileScanConfig>, DataFusionError>
fn repartitioned( &self, target_partitions: usize, repartition_file_min_size: usize, output_ordering: Option<LexOrdering>, config: &FileScanConfig, ) -> Result<Option<FileScanConfig>, DataFusionError>
If supported by the
FileSource, redistribute files across partitions
according to their size. Allows custom file formats to implement their
own repartitioning logic. Read moreSource§fn with_schema_adapter_factory(
&self,
_factory: Arc<dyn SchemaAdapterFactory>,
) -> Result<Arc<dyn FileSource>, DataFusionError>
fn with_schema_adapter_factory( &self, _factory: Arc<dyn SchemaAdapterFactory>, ) -> Result<Arc<dyn FileSource>, DataFusionError>
Set optional schema adapter factory. Read more
Source§fn schema_adapter_factory(&self) -> Option<Arc<dyn SchemaAdapterFactory>>
fn schema_adapter_factory(&self) -> Option<Arc<dyn SchemaAdapterFactory>>
Returns the current schema adapter factory if set Read more
Auto Trait Implementations§
impl Freeze for OrcSource
impl !RefUnwindSafe for OrcSource
impl Send for OrcSource
impl Sync for OrcSource
impl Unpin for OrcSource
impl !UnwindSafe for OrcSource
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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