Skip to content

Commit f4d1c71

Browse files
committed
Removed the TableProvider::scan_deep method
1 parent cd5aad0 commit f4d1c71

2 files changed

Lines changed: 3 additions & 51 deletions

File tree

datafusion/catalog-listing/src/table.rs

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -392,23 +392,6 @@ impl TableProvider for ListingTable {
392392
Ok(self.scan_with_args(state, options).await?.into_inner())
393393
}
394394

395-
async fn scan_deep(
396-
&self,
397-
state: &dyn Session,
398-
projection: Option<&Vec<usize>>,
399-
projection_deep: Option<&HashMap<usize, Vec<String>>>,
400-
filters: &[Expr],
401-
limit: Option<usize>,
402-
) -> datafusion_common::Result<Arc<dyn ExecutionPlan>> {
403-
let options = ScanArgs::default()
404-
.with_projection(projection.map(|p| p.as_slice()))
405-
.with_projection_deep(projection_deep)
406-
.with_filters(Some(filters))
407-
.with_limit(limit);
408-
409-
Ok(self.scan_with_args(state, options).await?.into_inner())
410-
}
411-
412395
async fn scan_with_args<'a>(
413396
&self,
414397
state: &dyn Session,

datafusion/catalog/src/table.rs

Lines changed: 3 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -172,27 +172,6 @@ pub trait TableProvider: Debug + Sync + Send {
172172
limit: Option<usize>,
173173
) -> Result<Arc<dyn ExecutionPlan>>;
174174

175-
/// Create an [`ExecutionPlan`] with an extra parameter
176-
/// specifying the deep column projections
177-
/// # Deep column projection
178-
///
179-
/// If specified, a datasource such as Parquet can do deep projection pushdown.
180-
/// In the case of deeply nested schemas (lists in structs etc), the
181-
/// implementation can return a smaller schema that rewrites the entire file
182-
/// schema to return only the necessary fields, no matter where they are (top-level
183-
/// or deep)
184-
///
185-
async fn scan_deep(
186-
&self,
187-
state: &dyn Session,
188-
projection: Option<&Vec<usize>>,
189-
_projection_deep: Option<&HashMap<usize, Vec<String>>>,
190-
filters: &[Expr],
191-
limit: Option<usize>,
192-
) -> Result<Arc<dyn ExecutionPlan>> {
193-
self.scan(state, projection, filters, limit).await
194-
}
195-
196175
/// Create an [`ExecutionPlan`] for scanning the table using structured arguments.
197176
///
198177
/// This method uses [`ScanArgs`] to pass scan parameters in a structured way
@@ -217,20 +196,10 @@ pub trait TableProvider: Debug + Sync + Send {
217196
) -> Result<ScanResult> {
218197
let filters = args.filters().unwrap_or(&[]);
219198
let projection = args.projection().map(|p| p.to_vec());
220-
let projection_deep = args.projection_deep.map(|x| {
221-
x.clone()
222-
});
223199
let limit = args.limit();
224-
let plan = if projection_deep.is_some() {
225-
self
226-
.scan_deep(state, projection.as_ref(), projection_deep.as_ref(), filters, limit)
227-
.await?
228-
229-
} else {
230-
self
231-
.scan(state, projection.as_ref(), filters, limit)
232-
.await?
233-
};
200+
let plan = self
201+
.scan(state, projection.as_ref(), filters, limit)
202+
.await?;
234203
Ok(plan.into())
235204
}
236205

0 commit comments

Comments
 (0)