MCPcopy Create free account
hub / github.com/apache/datafusion / build

Method build

datafusion/datasource-parquet/src/push_decoder.rs:74–94  ·  view source on GitHub ↗

Build a [`ParquetPushDecoderBuilder`] for a single decoder run. The caller is expected to attach the run-specific [`RowFilter`](parquet::arrow::arrow_reader::RowFilter) and predicate cache size on the returned builder.

(
        &self,
        prepared_access_plan: PreparedAccessPlan,
        metadata: ArrowReaderMetadata,
    )

Source from the content-addressed store, hash-verified

72 /// [`RowFilter`](parquet::arrow::arrow_reader::RowFilter) and predicate
73 /// cache size on the returned builder.
74 pub(crate) fn build(
75 &self,
76 prepared_access_plan: PreparedAccessPlan,
77 metadata: ArrowReaderMetadata,
78 ) -> ParquetPushDecoderBuilder {
79 let mut builder = ParquetPushDecoderBuilder::new_with_metadata(metadata)
80 .with_projection(self.read_plan.projection_mask.clone())
81 .with_batch_size(self.batch_size)
82 .with_metrics(self.arrow_reader_metrics.clone());
83 if self.force_filter_selections {
84 builder = builder.with_row_selection_policy(RowSelectionPolicy::Selectors);
85 }
86 if let Some(row_selection) = prepared_access_plan.row_selection {
87 builder = builder.with_row_selection(row_selection);
88 }
89 builder = builder.with_row_groups(prepared_access_plan.row_group_indexes);
90 if let Some(limit) = self.decoder_limit {
91 builder = builder.with_limit(limit);
92 }
93 builder
94 }
95}
96
97/// State for a stream that decodes a single Parquet file using a push-based decoder.

Callers

nothing calls this directly

Calls 5

with_metricsMethod · 0.45
with_batch_sizeMethod · 0.45
with_projectionMethod · 0.45
cloneMethod · 0.45
with_limitMethod · 0.45

Tested by

no test coverage detected