Skip to content

Commit 12986a4

Browse files
Make FileScanConfig decoding context aware
1 parent 8e5eaa7 commit 12986a4

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

ballista/rust/core/src/serde/physical_plan/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,19 +121,19 @@ impl AsExecutionPlan for PhysicalPlanNode {
121121
Ok(Arc::new(FilterExec::try_new(predicate, input)?))
122122
}
123123
PhysicalPlanType::CsvScan(scan) => Ok(Arc::new(CsvExec::new(
124-
scan.base_conf.as_ref().unwrap().try_into()?,
124+
decode_scan_config(scan.base_conf.as_ref().unwrap(), &ctx)?,
125125
scan.has_header,
126126
str_to_byte(&scan.delimiter)?,
127127
))),
128128
PhysicalPlanType::ParquetScan(scan) => {
129129
Ok(Arc::new(ParquetExec::new(
130-
scan.base_conf.as_ref().unwrap().try_into()?,
130+
decode_scan_config(scan.base_conf.as_ref().unwrap(), &ctx)?,
131131
// TODO predicate should be de-serialized
132132
None,
133133
)))
134134
}
135135
PhysicalPlanType::AvroScan(scan) => Ok(Arc::new(AvroExec::new(
136-
scan.base_conf.as_ref().unwrap().try_into()?,
136+
decode_scan_config(scan.base_conf.as_ref().unwrap(), &ctx)?,
137137
))),
138138
PhysicalPlanType::CoalesceBatches(coalesce_batches) => {
139139
let input: Arc<dyn ExecutionPlan> =

ballista/rust/executor/src/execution_loop.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
// specific language governing permissions and limitations
1616
// under the License.
1717

18-
1918
use std::sync::atomic::{AtomicUsize, Ordering};
2019
use std::sync::mpsc::{Receiver, Sender, TryRecvError};
2120
use std::{sync::Arc, time::Duration};

ballista/rust/executor/src/executor.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,7 @@ use datafusion::error::DataFusionError;
2828
use datafusion::execution::runtime_env::RuntimeEnv;
2929
use datafusion::physical_plan::display::DisplayableExecutionPlan;
3030
use datafusion::physical_plan::{ExecutionPlan, Partitioning};
31-
use datafusion::prelude::{ExecutionContext,ExecutionConfig};
32-
31+
use datafusion::prelude::{ExecutionConfig, ExecutionContext};
3332

3433
/// Ballista executor
3534
pub struct Executor<T: 'static + AsExecutionPlan> {

0 commit comments

Comments
 (0)