Skip to content

Commit e902e1f

Browse files
committed
Improve distributed_ext.rs doc comments
1 parent e94da39 commit e902e1f

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

src/distributed_ext.rs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,15 @@ pub trait DistributedExt: Sized {
4444
/// const PREFIX: &'static str = "custom";
4545
/// }
4646
///
47-
/// let mut opt = CustomExtension::default();
47+
/// let mut my_custom_extension = CustomExtension::default();
4848
/// // Now, the CustomExtension will be able to cross network boundaries. Upon making an Arrow
4949
/// // Flight request, it will be sent through gRPC metadata.
5050
/// let mut config = SessionConfig::new()
51-
/// .with_distributed_option_extension(opt).unwrap();
51+
/// .with_distributed_option_extension(my_custom_extension).unwrap();
5252
///
5353
/// async fn build_state(ctx: DistributedSessionBuilderContext) -> Result<SessionState, DataFusionError> {
54-
/// // while providing this MyCustomSessionBuilder to an Arrow Flight endpoint, it will
55-
/// // know how to deserialize the CustomExtension from the gRPC metadata.
54+
/// // This function can be provided to an ArrowFlightEndpoint in order to tell it how to
55+
/// // build sessions that retrieve the CustomExtension from gRPC metadata.
5656
/// Ok(SessionStateBuilder::new()
5757
/// .with_distributed_option_extension_from_headers::<CustomExtension>(&ctx.headers)?
5858
/// .build())
@@ -99,15 +99,15 @@ pub trait DistributedExt: Sized {
9999
/// const PREFIX: &'static str = "custom";
100100
/// }
101101
///
102-
/// let mut opt = CustomExtension::default();
102+
/// let mut my_custom_extension = CustomExtension::default();
103103
/// // Now, the CustomExtension will be able to cross network boundaries. Upon making an Arrow
104104
/// // Flight request, it will be sent through gRPC metadata.
105105
/// let mut config = SessionConfig::new()
106-
/// .with_distributed_option_extension(opt).unwrap();
106+
/// .with_distributed_option_extension(my_custom_extension).unwrap();
107107
///
108108
/// async fn build_state(ctx: DistributedSessionBuilderContext) -> Result<SessionState, DataFusionError> {
109-
/// // while providing this MyCustomSessionBuilder to an Arrow Flight endpoint, it will
110-
/// // know how to deserialize the CustomExtension from the gRPC metadata.
109+
/// // This function can be provided to an ArrowFlightEndpoint in order to tell it how to
110+
/// // build sessions that retrieve the CustomExtension from gRPC metadata.
111111
/// Ok(SessionStateBuilder::new()
112112
/// .with_distributed_option_extension_from_headers::<CustomExtension>(&ctx.headers)?
113113
/// .build())
@@ -154,8 +154,8 @@ pub trait DistributedExt: Sized {
154154
/// let config = SessionConfig::new().with_distributed_user_codec(CustomExecCodec);
155155
///
156156
/// async fn build_state(ctx: DistributedSessionBuilderContext) -> Result<SessionState, DataFusionError> {
157-
/// // while providing this MyCustomSessionBuilder to an Arrow Flight endpoint, it will
158-
/// // know how to deserialize the CustomExtension from the gRPC metadata.
157+
/// // This function can be provided to an ArrowFlightEndpoint in order to tell it how to
158+
/// // encode/decode CustomExec nodes.
159159
/// Ok(SessionStateBuilder::new()
160160
/// .with_distributed_user_codec(CustomExecCodec)
161161
/// .build())
@@ -195,8 +195,8 @@ pub trait DistributedExt: Sized {
195195
/// let config = SessionConfig::new().with_distributed_channel_resolver(CustomChannelResolver);
196196
///
197197
/// async fn build_state(ctx: DistributedSessionBuilderContext) -> Result<SessionState, DataFusionError> {
198-
/// // while providing this MyCustomSessionBuilder to an Arrow Flight endpoint, it will
199-
/// // know how to deserialize the CustomExtension from the gRPC metadata.
198+
/// // This function can be provided to an ArrowFlightEndpoint so that it knows how to
199+
/// // resolve tonic channels from URLs upon making network calls to other nodes.
200200
/// Ok(SessionStateBuilder::new()
201201
/// .with_distributed_channel_resolver(CustomChannelResolver)
202202
/// .build())

0 commit comments

Comments
 (0)