alamb commented on code in PR #7175:
URL: https://github.com/apache/arrow-datafusion/pull/7175#discussion_r1283155107
##########
datafusion/core/src/datasource/physical_plan/mod.rs:
##########
@@ -110,22 +110,12 @@ pub fn get_scan_files(
) -> Result<Vec<Vec<Vec<PartitionedFile>>>> {
let mut collector: Vec<Vec<Vec<PartitionedFile>>> = vec![];
plan.apply(&mut |plan| {
- let plan_any = plan.as_any();
- let file_groups =
- if let Some(parquet_exec) = plan_any.downcast_ref::<ParquetExec>()
{
- parquet_exec.base_config().file_groups.clone()
- } else if let Some(avro_exec) =
plan_any.downcast_ref::<AvroExec>() {
- avro_exec.base_config().file_groups.clone()
- } else if let Some(json_exec) =
plan_any.downcast_ref::<NdJsonExec>() {
- json_exec.base_config().file_groups.clone()
- } else if let Some(csv_exec) = plan_any.downcast_ref::<CsvExec>() {
- csv_exec.base_config().file_groups.clone()
- } else {
- return Ok(VisitRecursion::Continue);
- };
-
- collector.push(file_groups);
- Ok(VisitRecursion::Skip)
+ if let Some(file_scan_config) = plan.file_scan_config() {
Review Comment:
that certainly looks nicer
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]