Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add name method to execution plan #9793

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions datafusion-examples/examples/custom_datasource.rs
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,10 @@ impl DisplayAs for CustomExec {
}

impl ExecutionPlan for CustomExec {
fn name(&self) -> &'static str {
"CustomExec"
}

fn as_any(&self) -> &dyn Any {
self
}
Expand Down
4 changes: 4 additions & 0 deletions datafusion/core/src/datasource/physical_plan/arrow_file.rs
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,10 @@ impl DisplayAs for ArrowExec {
}

impl ExecutionPlan for ArrowExec {
fn name(&self) -> &'static str {
"ArrowExec"
}

fn as_any(&self) -> &dyn Any {
self
}
Expand Down
4 changes: 4 additions & 0 deletions datafusion/core/src/datasource/physical_plan/avro.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,10 @@ impl DisplayAs for AvroExec {
}

impl ExecutionPlan for AvroExec {
fn name(&self) -> &'static str {
"AvroExec"
}

fn as_any(&self) -> &dyn Any {
self
}
Expand Down
4 changes: 4 additions & 0 deletions datafusion/core/src/datasource/physical_plan/csv.rs
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,10 @@ impl DisplayAs for CsvExec {
}

impl ExecutionPlan for CsvExec {
fn name(&self) -> &'static str {
"CsvExec"
}

/// Return a reference to Any that can be used for downcasting
fn as_any(&self) -> &dyn Any {
self
Expand Down
4 changes: 4 additions & 0 deletions datafusion/core/src/datasource/physical_plan/json.rs
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,10 @@ impl DisplayAs for NdJsonExec {
}

impl ExecutionPlan for NdJsonExec {
fn name(&self) -> &'static str {
"NdJsonExec"
}

fn as_any(&self) -> &dyn Any {
self
}
Expand Down
4 changes: 4 additions & 0 deletions datafusion/core/src/datasource/physical_plan/parquet/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,10 @@ impl DisplayAs for ParquetExec {
}

impl ExecutionPlan for ParquetExec {
fn name(&self) -> &'static str {
"ParquetExec"
}

/// Return a reference to Any that can be used for downcasting
fn as_any(&self) -> &dyn Any {
self
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1369,6 +1369,10 @@ pub(crate) mod tests {
}

impl ExecutionPlan for SortRequiredExec {
fn name(&self) -> &'static str {
"SortRequiredExec"
}

fn as_any(&self) -> &dyn std::any::Any {
self
}
Expand Down
4 changes: 4 additions & 0 deletions datafusion/core/src/physical_optimizer/output_requirements.rs
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,10 @@ impl DisplayAs for OutputRequirementExec {
}

impl ExecutionPlan for OutputRequirementExec {
fn name(&self) -> &'static str {
"OutputRequirementExec"
}

fn as_any(&self) -> &dyn std::any::Any {
self
}
Expand Down
4 changes: 4 additions & 0 deletions datafusion/core/src/physical_planner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2625,6 +2625,10 @@ mod tests {
}

impl ExecutionPlan for NoOpExecutionPlan {
fn name(&self) -> &'static str {
"NoOpExecutionPlan"
}

/// Return a reference to Any that can be used for downcasting
fn as_any(&self) -> &dyn Any {
self
Expand Down
8 changes: 8 additions & 0 deletions datafusion/physical-plan/src/aggregates/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -636,6 +636,10 @@ impl DisplayAs for AggregateExec {
}

impl ExecutionPlan for AggregateExec {
fn name(&self) -> &'static str {
"AggregateExec"
}

/// Return a reference to Any that can be used for down-casting
fn as_any(&self) -> &dyn Any {
self
Expand Down Expand Up @@ -1658,6 +1662,10 @@ mod tests {
}

impl ExecutionPlan for TestYieldingExec {
fn name(&self) -> &'static str {
"TestYieldingExec"
}

fn as_any(&self) -> &dyn Any {
self
}
Expand Down
4 changes: 4 additions & 0 deletions datafusion/physical-plan/src/analyze.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,10 @@ impl DisplayAs for AnalyzeExec {
}

impl ExecutionPlan for AnalyzeExec {
fn name(&self) -> &'static str {
"AnalyzeExec"
}

/// Return a reference to Any that can be used for downcasting
fn as_any(&self) -> &dyn Any {
self
Expand Down
4 changes: 4 additions & 0 deletions datafusion/physical-plan/src/coalesce_batches.rs
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,10 @@ impl DisplayAs for CoalesceBatchesExec {
}

impl ExecutionPlan for CoalesceBatchesExec {
fn name(&self) -> &'static str {
"CoalesceBatchesExec"
}

/// Return a reference to Any that can be used for downcasting
fn as_any(&self) -> &dyn Any {
self
Expand Down
4 changes: 4 additions & 0 deletions datafusion/physical-plan/src/coalesce_partitions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,10 @@ impl DisplayAs for CoalescePartitionsExec {
}

impl ExecutionPlan for CoalescePartitionsExec {
fn name(&self) -> &'static str {
"CoalescePartitionsExec"
}

/// Return a reference to Any that can be used for downcasting
fn as_any(&self) -> &dyn Any {
self
Expand Down
4 changes: 4 additions & 0 deletions datafusion/physical-plan/src/display.rs
Original file line number Diff line number Diff line change
Expand Up @@ -489,6 +489,10 @@ mod tests {
}

impl ExecutionPlan for TestStatsExecPlan {
fn name(&self) -> &'static str {
"TestStatsExecPlan"
}

fn as_any(&self) -> &dyn std::any::Any {
self
}
Expand Down
4 changes: 4 additions & 0 deletions datafusion/physical-plan/src/empty.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,10 @@ impl DisplayAs for EmptyExec {
}

impl ExecutionPlan for EmptyExec {
fn name(&self) -> &'static str {
"EmptyExec"
}

/// Return a reference to Any that can be used for downcasting
fn as_any(&self) -> &dyn Any {
self
Expand Down
4 changes: 4 additions & 0 deletions datafusion/physical-plan/src/explain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,10 @@ impl DisplayAs for ExplainExec {
}

impl ExecutionPlan for ExplainExec {
fn name(&self) -> &'static str {
"ExplainExec"
}

/// Return a reference to Any that can be used for downcasting
fn as_any(&self) -> &dyn Any {
self
Expand Down
4 changes: 4 additions & 0 deletions datafusion/physical-plan/src/filter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,10 @@ impl DisplayAs for FilterExec {
}

impl ExecutionPlan for FilterExec {
fn name(&self) -> &'static str {
"FilterExec"
}

/// Return a reference to Any that can be used for downcasting
fn as_any(&self) -> &dyn Any {
self
Expand Down
4 changes: 4 additions & 0 deletions datafusion/physical-plan/src/insert.rs
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,10 @@ impl DisplayAs for FileSinkExec {
}

impl ExecutionPlan for FileSinkExec {
fn name(&self) -> &'static str {
"FileSinkExec"
}

/// Return a reference to Any that can be used for downcasting
fn as_any(&self) -> &dyn Any {
self
Expand Down
4 changes: 4 additions & 0 deletions datafusion/physical-plan/src/joins/cross_join.rs
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,10 @@ impl DisplayAs for CrossJoinExec {
}

impl ExecutionPlan for CrossJoinExec {
fn name(&self) -> &'static str {
"CrossJoinExec"
}

fn as_any(&self) -> &dyn Any {
self
}
Expand Down
4 changes: 4 additions & 0 deletions datafusion/physical-plan/src/joins/hash_join.rs
Original file line number Diff line number Diff line change
Expand Up @@ -611,6 +611,10 @@ fn project_index_to_exprs(
}

impl ExecutionPlan for HashJoinExec {
fn name(&self) -> &'static str {
"HashJoinExec"
}

fn as_any(&self) -> &dyn Any {
self
}
Expand Down
4 changes: 4 additions & 0 deletions datafusion/physical-plan/src/joins/nested_loop_join.rs
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,10 @@ impl DisplayAs for NestedLoopJoinExec {
}

impl ExecutionPlan for NestedLoopJoinExec {
fn name(&self) -> &'static str {
"NestedLoopJoinExec"
}

fn as_any(&self) -> &dyn Any {
self
}
Expand Down
4 changes: 4 additions & 0 deletions datafusion/physical-plan/src/joins/sort_merge_join.rs
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,10 @@ impl DisplayAs for SortMergeJoinExec {
}

impl ExecutionPlan for SortMergeJoinExec {
fn name(&self) -> &'static str {
"SortMergeJoinExec"
}

fn as_any(&self) -> &dyn Any {
self
}
Expand Down
4 changes: 4 additions & 0 deletions datafusion/physical-plan/src/joins/symmetric_hash_join.rs
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,10 @@ impl DisplayAs for SymmetricHashJoinExec {
}

impl ExecutionPlan for SymmetricHashJoinExec {
fn name(&self) -> &'static str {
"SymmetricHashJoinExec"
}

fn as_any(&self) -> &dyn Any {
self
}
Expand Down
Loading
Loading