fn try_into_physical_plan()

in datafusion/proto/src/physical_plan/mod.rs [118:328]


    fn try_into_physical_plan(
        &self,
        registry: &dyn FunctionRegistry,
        runtime: &RuntimeEnv,
        extension_codec: &dyn PhysicalExtensionCodec,
    ) -> Result<Arc<dyn ExecutionPlan>> {
        let plan = self.physical_plan_type.as_ref().ok_or_else(|| {
            proto_error(format!(
                "physical_plan::from_proto() Unsupported physical plan '{self:?}'"
            ))
        })?;
        match plan {
            PhysicalPlanType::Explain(explain) => self.try_into_explain_physical_plan(
                explain,
                registry,
                runtime,
                extension_codec,
            ),
            PhysicalPlanType::Projection(projection) => self
                .try_into_projection_physical_plan(
                    projection,
                    registry,
                    runtime,
                    extension_codec,
                ),
            PhysicalPlanType::Filter(filter) => self.try_into_filter_physical_plan(
                filter,
                registry,
                runtime,
                extension_codec,
            ),
            PhysicalPlanType::CsvScan(scan) => self.try_into_csv_scan_physical_plan(
                scan,
                registry,
                runtime,
                extension_codec,
            ),
            PhysicalPlanType::JsonScan(scan) => self.try_into_json_scan_physical_plan(
                scan,
                registry,
                runtime,
                extension_codec,
            ),
            #[cfg_attr(not(feature = "parquet"), allow(unused_variables))]
            PhysicalPlanType::ParquetScan(scan) => self
                .try_into_parquet_scan_physical_plan(
                    scan,
                    registry,
                    runtime,
                    extension_codec,
                ),
            #[cfg_attr(not(feature = "avro"), allow(unused_variables))]
            PhysicalPlanType::AvroScan(scan) => self.try_into_avro_scan_physical_plan(
                scan,
                registry,
                runtime,
                extension_codec,
            ),
            PhysicalPlanType::CoalesceBatches(coalesce_batches) => self
                .try_into_coalesce_batches_physical_plan(
                    coalesce_batches,
                    registry,
                    runtime,
                    extension_codec,
                ),
            PhysicalPlanType::Merge(merge) => self.try_into_merge_physical_plan(
                merge,
                registry,
                runtime,
                extension_codec,
            ),
            PhysicalPlanType::Repartition(repart) => self
                .try_into_repartition_physical_plan(
                    repart,
                    registry,
                    runtime,
                    extension_codec,
                ),
            PhysicalPlanType::GlobalLimit(limit) => self
                .try_into_global_limit_physical_plan(
                    limit,
                    registry,
                    runtime,
                    extension_codec,
                ),
            PhysicalPlanType::LocalLimit(limit) => self
                .try_into_local_limit_physical_plan(
                    limit,
                    registry,
                    runtime,
                    extension_codec,
                ),
            PhysicalPlanType::Window(window_agg) => self.try_into_window_physical_plan(
                window_agg,
                registry,
                runtime,
                extension_codec,
            ),
            PhysicalPlanType::Aggregate(hash_agg) => self
                .try_into_aggregate_physical_plan(
                    hash_agg,
                    registry,
                    runtime,
                    extension_codec,
                ),
            PhysicalPlanType::HashJoin(hashjoin) => self
                .try_into_hash_join_physical_plan(
                    hashjoin,
                    registry,
                    runtime,
                    extension_codec,
                ),
            PhysicalPlanType::SymmetricHashJoin(sym_join) => self
                .try_into_symmetric_hash_join_physical_plan(
                    sym_join,
                    registry,
                    runtime,
                    extension_codec,
                ),
            PhysicalPlanType::Union(union) => self.try_into_union_physical_plan(
                union,
                registry,
                runtime,
                extension_codec,
            ),
            PhysicalPlanType::Interleave(interleave) => self
                .try_into_interleave_physical_plan(
                    interleave,
                    registry,
                    runtime,
                    extension_codec,
                ),
            PhysicalPlanType::CrossJoin(crossjoin) => self
                .try_into_cross_join_physical_plan(
                    crossjoin,
                    registry,
                    runtime,
                    extension_codec,
                ),
            PhysicalPlanType::Empty(empty) => self.try_into_empty_physical_plan(
                empty,
                registry,
                runtime,
                extension_codec,
            ),
            PhysicalPlanType::PlaceholderRow(placeholder) => self
                .try_into_placeholder_row_physical_plan(
                    placeholder,
                    registry,
                    runtime,
                    extension_codec,
                ),
            PhysicalPlanType::Sort(sort) => {
                self.try_into_sort_physical_plan(sort, registry, runtime, extension_codec)
            }
            PhysicalPlanType::SortPreservingMerge(sort) => self
                .try_into_sort_preserving_merge_physical_plan(
                    sort,
                    registry,
                    runtime,
                    extension_codec,
                ),
            PhysicalPlanType::Extension(extension) => self
                .try_into_extension_physical_plan(
                    extension,
                    registry,
                    runtime,
                    extension_codec,
                ),
            PhysicalPlanType::NestedLoopJoin(join) => self
                .try_into_nested_loop_join_physical_plan(
                    join,
                    registry,
                    runtime,
                    extension_codec,
                ),
            PhysicalPlanType::Analyze(analyze) => self.try_into_analyze_physical_plan(
                analyze,
                registry,
                runtime,
                extension_codec,
            ),
            PhysicalPlanType::JsonSink(sink) => self.try_into_json_sink_physical_plan(
                sink,
                registry,
                runtime,
                extension_codec,
            ),
            PhysicalPlanType::CsvSink(sink) => self.try_into_csv_sink_physical_plan(
                sink,
                registry,
                runtime,
                extension_codec,
            ),

            #[cfg_attr(not(feature = "parquet"), allow(unused_variables))]
            PhysicalPlanType::ParquetSink(sink) => self
                .try_into_parquet_sink_physical_plan(
                    sink,
                    registry,
                    runtime,
                    extension_codec,
                ),
            PhysicalPlanType::Unnest(unnest) => self.try_into_unnest_physical_plan(
                unnest,
                registry,
                runtime,
                extension_codec,
            ),
        }
    }