Skip to content

Commit fd545be

Browse files
adriangbclaude
andcommitted
Hide decode_execution_plan from docs
It is only public because datafusion-proto calls it across a crate boundary. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 4fb1528 commit fd545be

2 files changed

Lines changed: 11 additions & 3 deletions

File tree

‎datafusion/physical-plan/src/proto/mod.rs‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,11 @@ use datafusion_proto_models::protobuf::{
9393
use crate::ExecutionPlan;
9494

9595
pub use datafusion_proto_models::ProtoDecoderRegistry;
96+
// Not public API: see `decode_execution_plan`.
97+
#[doc(hidden)]
98+
pub use registry::decode_execution_plan;
9699
pub use registry::{
97-
ExtensionPlanFromProto, decode_execution_plan, execution_plan_names,
98-
register_execution_plan,
100+
ExtensionPlanFromProto, execution_plan_names, register_execution_plan,
99101
};
100102

101103
/// Internal dispatch trait backing [`ExecutionPlanEncodeCtx`].

‎datafusion/physical-plan/src/proto/registry.rs‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,8 @@ pub trait ExtensionPlanFromProto: ExecutionPlan + Sized {
107107
/// Deliberately private, and the same type on both the
108108
/// [`register_execution_plan`] and the [`decode_execution_plan`] side.
109109
/// [`ExtensionPlanFromProto`] is the public contract and
110-
/// [`decode_execution_plan`] is the public way to invoke one, so this can
110+
/// [`decode_execution_plan`] (hidden, internal to DataFusion) is the only way
111+
/// to invoke one, so this can
111112
/// become something else — a `dyn` decoder object, to admit stateful or
112113
/// closure decoders, which is what an FFI decoder needs — without a breaking
113114
/// change.
@@ -167,6 +168,11 @@ pub fn register_execution_plan<T: ExtensionPlanFromProto>(
167168
/// `Some(Err(..))` means the decoder that *does* own the name failed, which is
168169
/// fatal: falling back there would let another codec decode the payload
169170
/// wrongly, the very thing the name exists to prevent.
171+
///
172+
/// Not intended as public API: `datafusion-proto` drives decoding and is the
173+
/// only intended caller. It is `pub` only because that call crosses a crate
174+
/// boundary, so it is hidden from the docs and may change without notice.
175+
#[doc(hidden)]
170176
pub fn decode_execution_plan(
171177
registry: &ProtoDecoderRegistry,
172178
node: &PhysicalPlanNode,

0 commit comments

Comments
 (0)