Skip to content
Open
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
12 changes: 12 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions datafusion-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ arrow = { workspace = true }
async-trait = { workspace = true }
aws-config = "1.8.14"
aws-credential-types = "1.2.13"
bytes = { workspace = true }
chrono = { workspace = true }
clap = { version = "4.5.60", features = ["cargo", "derive"] }
datafusion = { workspace = true, features = [
Expand All @@ -60,6 +61,7 @@ dirs = "6.0.0"
env_logger = { workspace = true }
futures = { workspace = true }
log = { workspace = true }
memmap2 = "0.9"
mimalloc = { version = "0.1", default-features = false }
object_store = { workspace = true, features = ["aws", "gcp", "http"] }
parking_lot = { workspace = true }
Expand All @@ -77,4 +79,5 @@ ctor = { workspace = true }
insta = { workspace = true }
insta-cmd = "0.6.0"
rstest = { workspace = true }
tempfile = { workspace = true }
testcontainers-modules = { workspace = true, features = ["minio"] }
6 changes: 6 additions & 0 deletions datafusion-cli/src/object_storage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
// under the License.

pub mod instrumented;
pub mod mmap;

use async_trait::async_trait;
use aws_config::BehaviorVersion;
Expand All @@ -32,6 +33,7 @@ use datafusion::{
execution::context::SessionState,
};
use log::debug;
use mmap::MmapObjectStore;
use object_store::{
ClientOptions, CredentialProvider,
Error::Generic,
Expand Down Expand Up @@ -564,6 +566,10 @@ pub(crate) async fn get_object_store(
.with_url(url.origin().ascii_serialization())
.build()?,
),
"file" => {
// Mmap local files for zero copy reads from the page cache, avoiding blocking I/O
Arc::new(MmapObjectStore::new())
}
_ => {
// For other types, try to get from `object_store_registry`:
state
Expand Down
Loading
Loading