Struct datafusion::datasource::listing::ListingTableUrl
source · pub struct ListingTableUrl { /* private fields */ }
Expand description
A parsed URL identifying files for a listing table, see ListingTableUrl::parse
for more information on the supported expressions
Implementations§
source§impl ListingTableUrl
impl ListingTableUrl
sourcepub fn parse(s: impl AsRef<str>) -> Result<Self>
pub fn parse(s: impl AsRef<str>) -> Result<Self>
Parse a provided string as a ListingTableUrl
Paths without a Scheme
If no scheme is provided, or the string is an absolute filesystem path
as determined std::path::Path::is_absolute
, the string will be
interpreted as a path on the local filesystem using the operating
system’s standard path delimiter, i.e. \
on Windows, /
on Unix.
If the path contains any of '?', '*', '['
, it will be considered
a glob expression and resolved as described in the section below.
Otherwise, the path will be resolved to an absolute path, returning an error if it does not exist, and converted to a file URI
If you wish to specify a path that does not exist on the local
machine you must provide it as a fully-qualified file URI
e.g. file:///myfile.txt
Glob File Paths
If no scheme is provided, and the path contains a glob expression, it will be resolved as follows.
The string up to the first path segment containing a glob expression will be extracted, and resolved in the same manner as a normal scheme-less path. That is, resolved to an absolute path on the local filesystem, returning an error if it does not exist, and converted to a file URI
The remaining string will be interpreted as a glob::Pattern
and used as a
filter when listing files from object storage
sourcepub fn as_str(&self) -> &str
pub fn as_str(&self) -> &str
Returns this ListingTableUrl
as a string
sourcepub fn object_store(&self) -> ObjectStoreUrl
pub fn object_store(&self) -> ObjectStoreUrl
Return the ObjectStoreUrl
for this ListingTableUrl
Trait Implementations§
source§impl AsRef<Url> for ListingTableUrl
impl AsRef<Url> for ListingTableUrl
source§impl AsRef<str> for ListingTableUrl
impl AsRef<str> for ListingTableUrl
source§impl Clone for ListingTableUrl
impl Clone for ListingTableUrl
source§fn clone(&self) -> ListingTableUrl
fn clone(&self) -> ListingTableUrl
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more