Skip to content

Commit f05534a

Browse files
committed
Add http(s) support to the command line
1 parent 819d357 commit f05534a

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

datafusion-cli/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ dirs = "4.0.0"
4040
env_logger = "0.9"
4141
futures = "0.3"
4242
mimalloc = { version = "0.1", default-features = false }
43-
object_store = { version = "0.8.0", features = ["aws", "gcp"] }
43+
object_store = { version = "0.8.0", features = ["aws", "gcp", "azure", "http"] }
4444
parking_lot = { version = "0.12" }
4545
parquet = { version = "49.0.0", default-features = false }
4646
regex = "1.8"

datafusion-cli/src/exec.rs

+4
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ use datafusion::prelude::SessionContext;
4343
use datafusion::sql::{parser::DFParser, sqlparser::dialect::dialect_from_str};
4444

4545
use object_store::ObjectStore;
46+
use object_store::http::HttpBuilder;
4647
use rustyline::error::ReadlineError;
4748
use rustyline::Editor;
4849
use tokio::signal;
@@ -278,6 +279,9 @@ async fn create_external_table(
278279
let builder = get_gcs_object_store_builder(url, cmd)?;
279280
Arc::new(builder.build()?) as Arc<dyn ObjectStore>
280281
}
282+
"http" | "https" => {
283+
Arc::new(HttpBuilder::new().with_url(url.origin().ascii_serialization()).build()?) as Arc<dyn ObjectStore>
284+
}
281285
_ => {
282286
// for other types, try to get from the object_store_registry
283287
ctx.runtime_env()

0 commit comments

Comments
 (0)