(s: &str)
| 123 | /// Creates a new [`ListingTableUrl`] interpreting `s` as a filesystem path |
| 124 | #[cfg(not(target_arch = "wasm32"))] |
| 125 | fn parse_path(s: &str) -> Result<Self> { |
| 126 | let (path, glob) = match split_glob_expression(s) { |
| 127 | Some((prefix, glob)) => { |
| 128 | let glob = Pattern::new(glob) |
| 129 | .map_err(|e| DataFusionError::External(Box::new(e)))?; |
| 130 | (prefix, Some(glob)) |
| 131 | } |
| 132 | None => (s, None), |
| 133 | }; |
| 134 | |
| 135 | let url = url_from_filesystem_path(path).ok_or_else(|| { |
| 136 | DataFusionError::External( |
| 137 | format!("Failed to convert path to URL: {path}").into(), |
| 138 | ) |
| 139 | })?; |
| 140 | |
| 141 | Self::try_new(url, glob) |
| 142 | } |
| 143 | |
| 144 | /// Creates a new [`ListingTableUrl`] from a url and optional glob expression |
| 145 | /// |
nothing calls this directly
no test coverage detected