Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions vortex-bench/src/utils/constants.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@
/// Storage type constants
pub const STORAGE_NVME: &str = "nvme";
pub const STORAGE_S3: &str = "s3";
pub const STORAGE_GCS: &str = "gcs";
2 changes: 2 additions & 0 deletions vortex-bench/src/utils/file.rs
Original file line number Diff line number Diff line change
Expand Up @@ -161,11 +161,13 @@ pub fn resolve_data_url(remote_data_dir: Option<&str>, local_subdir: &str) -> Re
/// - A storage type string ("s3", "nvme")
/// - Or an error if the scheme is unknown
pub fn url_scheme_to_storage(url: &Url) -> Result<String> {
use super::constants::STORAGE_GCS;
use super::constants::STORAGE_NVME;
use super::constants::STORAGE_S3;

match url.scheme() {
STORAGE_S3 => Ok(STORAGE_S3.to_owned()),
"gs" => Ok(STORAGE_GCS.to_owned()),
"file" => Ok(STORAGE_NVME.to_owned()),
otherwise => {
bail!("unknown URL scheme: {}", otherwise)
Expand Down
Loading