We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
ListingTableUrl::try_new
1 parent 72b855b commit e4bf951Copy full SHA for e4bf951
datafusion/datasource/src/url.rs
@@ -136,7 +136,12 @@ impl ListingTableUrl {
136
}
137
138
/// Creates a new [`ListingTableUrl`] from a url and optional glob expression
139
- fn try_new(url: Url, glob: Option<Pattern>) -> Result<Self> {
+ ///
140
+ /// [`Self::parse`] supports glob expression only for file system paths.
141
+ /// However, some applications may want to support glob expression for URLs with a scheme.
142
+ /// The application can split the URL into a base URL and a glob expression and use this method
143
+ /// to create a [`ListingTableUrl`].
144
+ pub fn try_new(url: Url, glob: Option<Pattern>) -> Result<Self> {
145
let prefix = Path::from_url_path(url.path())?;
146
Ok(Self { url, prefix, glob })
147
0 commit comments