MCPcopy Create free account
hub / github.com/apache/datafusion / register_object_store

Method register_object_store

datafusion/execution/src/runtime_env.rs:187–193  ·  view source on GitHub ↗

Registers a custom `ObjectStore` to be used with a specific url. This allows DataFusion to create external tables from urls that do not have built in support such as `hdfs://namenode:port/...`. Returns the [`ObjectStore`] previously registered for this scheme, if any. See [`ObjectStoreRegistry`] for more details # Example: Register local file system object store ``` # use std::sync::Arc; # use

(
        &self,
        url: &Url,
        object_store: Arc<dyn ObjectStore>,
    )

Source from the content-addressed store, hash-verified

185 /// runtime_env.register_object_store(&base_url, Arc::new(http_store));
186 /// ```
187 pub fn register_object_store(
188 &self,
189 url: &Url,
190 object_store: Arc<dyn ObjectStore>,
191 ) -> Option<Arc<dyn ObjectStore>> {
192 self.object_store_registry.register_store(url, object_store)
193 }
194
195 /// Deregisters a custom `ObjectStore` previously registered for a specific url.
196 /// See [`ObjectStoreRegistry::deregister_store`] for more details.

Callers 4

datafusionFunction · 0.45
build_runtimeMethod · 0.45

Calls 1

register_storeMethod · 0.45

Tested by 2