Skip to content

Commit bcdabd4

Browse files
authored
Merge branch 'main' into feat/spark-encode-function
2 parents a49a20f + 3d2e6b2 commit bcdabd4

177 files changed

Lines changed: 4856 additions & 1611 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/rust.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ on:
3838
- "**.md"
3939
- ".github/ISSUE_TEMPLATE/**"
4040
- ".github/pull_request_template.md"
41-
merge_group:
4241
# manual trigger
4342
# https://docs.github.com/en/actions/managing-workflow-runs/manually-running-a-workflow
4443
workflow_dispatch:

Cargo.lock

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

datafusion-cli/tests/cli_integration.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -414,14 +414,12 @@ fn test_backtrace_output(#[case] query: &str) {
414414
let output = cmd.output().expect("Failed to execute command");
415415
let stdout = String::from_utf8_lossy(&output.stdout);
416416
let stderr = String::from_utf8_lossy(&output.stderr);
417-
let combined_output = format!("{}{}", stdout, stderr);
417+
let combined_output = format!("{stdout}{stderr}");
418418

419419
// Assert that the output includes literal 'backtrace'
420420
assert!(
421421
combined_output.to_lowercase().contains("backtrace"),
422-
"Expected output to contain 'backtrace', but got stdout: '{}' stderr: '{}'",
423-
stdout,
424-
stderr
422+
"Expected output to contain 'backtrace', but got stdout: '{stdout}' stderr: '{stderr}'"
425423
);
426424
}
427425

datafusion-examples/examples/custom_data_source/adapter_serialization.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ impl PhysicalProtoConverterExtension for AdapterPreservingCodec {
317317
extension_codec: &dyn PhysicalExtensionCodec,
318318
) -> Result<PhysicalPlanNode> {
319319
// Check if this is a DataSourceExec with adapter
320-
if let Some(exec) = plan.as_any().downcast_ref::<DataSourceExec>()
320+
if let Some(exec) = plan.downcast_ref::<DataSourceExec>()
321321
&& let Some(config) =
322322
exec.data_source().as_any().downcast_ref::<FileScanConfig>()
323323
&& let Some(adapter_factory) = &config.expr_adapter_factory
@@ -481,7 +481,7 @@ fn inject_adapter_into_plan(
481481
plan: Arc<dyn ExecutionPlan>,
482482
adapter_factory: Arc<dyn PhysicalExprAdapterFactory>,
483483
) -> Result<Arc<dyn ExecutionPlan>> {
484-
if let Some(exec) = plan.as_any().downcast_ref::<DataSourceExec>()
484+
if let Some(exec) = plan.downcast_ref::<DataSourceExec>()
485485
&& let Some(config) = exec.data_source().as_any().downcast_ref::<FileScanConfig>()
486486
{
487487
let new_config = FileScanConfigBuilder::from(config.clone())
@@ -497,7 +497,7 @@ fn inject_adapter_into_plan(
497497
fn verify_adapter_in_plan(plan: &Arc<dyn ExecutionPlan>, label: &str) -> bool {
498498
// Walk the plan tree to find DataSourceExec with adapter
499499
fn check_plan(plan: &dyn ExecutionPlan) -> bool {
500-
if let Some(exec) = plan.as_any().downcast_ref::<DataSourceExec>()
500+
if let Some(exec) = plan.downcast_ref::<DataSourceExec>()
501501
&& let Some(config) =
502502
exec.data_source().as_any().downcast_ref::<FileScanConfig>()
503503
&& config.expr_adapter_factory.is_some()

datafusion-examples/examples/custom_data_source/custom_datasource.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -235,10 +235,6 @@ impl ExecutionPlan for CustomExec {
235235
"CustomExec"
236236
}
237237

238-
fn as_any(&self) -> &dyn Any {
239-
self
240-
}
241-
242238
fn properties(&self) -> &Arc<PlanProperties> {
243239
&self.cache
244240
}

datafusion-examples/examples/data_io/parquet_exec_visitor.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ impl ExecutionPlanVisitor for ParquetExecVisitor {
104104
/// or `post_visit` (visit each node after its children/inputs)
105105
fn pre_visit(&mut self, plan: &dyn ExecutionPlan) -> Result<bool, Self::Error> {
106106
// If needed match on a specific `ExecutionPlan` node type
107-
if let Some(data_source_exec) = plan.as_any().downcast_ref::<DataSourceExec>()
107+
if let Some(data_source_exec) = plan.downcast_ref::<DataSourceExec>()
108108
&& let Some((file_config, _)) =
109109
data_source_exec.downcast_to_file_source::<ParquetSource>()
110110
{

datafusion-examples/examples/execution_monitoring/memory_pool_execution_plan.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ use datafusion::physical_plan::{
4343
};
4444
use datafusion::prelude::*;
4545
use futures::stream::{StreamExt, TryStreamExt};
46-
use std::any::Any;
4746
use std::fmt;
4847
use std::sync::Arc;
4948

@@ -226,10 +225,6 @@ impl ExecutionPlan for BufferingExecutionPlan {
226225
"BufferingExecutionPlan"
227226
}
228227

229-
fn as_any(&self) -> &dyn Any {
230-
self
231-
}
232-
233228
fn schema(&self) -> SchemaRef {
234229
self.schema.clone()
235230
}

datafusion-examples/examples/proto/composed_extension_codec.rs

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
//! DeltaScan
3333
//! ```
3434
35-
use std::any::Any;
3635
use std::fmt::Debug;
3736
use std::sync::Arc;
3837

@@ -103,10 +102,6 @@ impl ExecutionPlan for ParentExec {
103102
"ParentExec"
104103
}
105104

106-
fn as_any(&self) -> &dyn Any {
107-
self
108-
}
109-
110105
fn properties(&self) -> &Arc<datafusion::physical_plan::PlanProperties> {
111106
unreachable!()
112107
}
@@ -161,7 +156,7 @@ impl PhysicalExtensionCodec for ParentPhysicalExtensionCodec {
161156
}
162157

163158
fn try_encode(&self, node: Arc<dyn ExecutionPlan>, buf: &mut Vec<u8>) -> Result<()> {
164-
if node.as_any().downcast_ref::<ParentExec>().is_some() {
159+
if node.is::<ParentExec>() {
165160
buf.extend_from_slice("ParentExec".as_bytes());
166161
Ok(())
167162
} else {
@@ -188,10 +183,6 @@ impl ExecutionPlan for ChildExec {
188183
"ChildExec"
189184
}
190185

191-
fn as_any(&self) -> &dyn Any {
192-
self
193-
}
194-
195186
fn properties(&self) -> &Arc<datafusion::physical_plan::PlanProperties> {
196187
unreachable!()
197188
}
@@ -244,7 +235,7 @@ impl PhysicalExtensionCodec for ChildPhysicalExtensionCodec {
244235
}
245236

246237
fn try_encode(&self, node: Arc<dyn ExecutionPlan>, buf: &mut Vec<u8>) -> Result<()> {
247-
if node.as_any().downcast_ref::<ChildExec>().is_some() {
238+
if node.is::<ChildExec>() {
248239
buf.extend_from_slice("ChildExec".as_bytes());
249240
Ok(())
250241
} else {

datafusion-examples/examples/proto/expression_deduplication.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,7 @@ pub async fn expression_deduplication() -> Result<()> {
124124

125125
// Step 5: check that we deduplicated expressions
126126
println!("Step 5: Checking for deduplicated expressions...");
127-
let Some(filter_exec) = deserialized_plan.as_any().downcast_ref::<FilterExec>()
128-
else {
127+
let Some(filter_exec) = deserialized_plan.downcast_ref::<FilterExec>() else {
129128
panic!("Deserialized plan is not a FilterExec");
130129
};
131130
let predicate = Arc::clone(filter_exec.predicate());

datafusion-examples/examples/relation_planner/table_sample.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,6 @@
8080
//! ```
8181
8282
use std::{
83-
any::Any,
8483
fmt::{self, Debug, Formatter},
8584
hash::{Hash, Hasher},
8685
pin::Pin,
@@ -682,10 +681,6 @@ impl ExecutionPlan for SampleExec {
682681
"SampleExec"
683682
}
684683

685-
fn as_any(&self) -> &dyn Any {
686-
self
687-
}
688-
689684
fn properties(&self) -> &Arc<PlanProperties> {
690685
&self.cache
691686
}

0 commit comments

Comments
 (0)