alamb commented on code in PR #10617:
URL: https://github.com/apache/datafusion/pull/10617#discussion_r1610105648
##########
datafusion/execution/src/runtime_env.rs:
##########
@@ -89,6 +89,27 @@ impl RuntimeEnv {
/// scheme, if any.
///
/// See [`ObjectStoreRegistry`] for more details
+ ///
+ /// # Examples
+ ///
+ /// Here's how to set up a local file system object store:
+ /// ```
+ /// let url = Url::try_from("file://").unwrap();
+ /// let object_store = object_store::local::LocalFileSystem::new();
+ /// ctx.runtime_env()
+ /// .register_object_store(&url, Arc::new(object_store));
+ /// ```
+ ///
+ /// Or how to set up a http object store:
+ /// ```
+ /// let base_url = Url::parse("https://github.com").unwrap();
Review Comment:
These examples are run automatically via `cargo test --doc` -- so they need
to be completely standlone
I took the liberty of pushing a commit to this PR that did so
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]