Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

create new datafusion-execution crate, start splitting code out #5432

Merged
merged 3 commits into from
Mar 1, 2023
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 Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ members = [
"datafusion/common",
"datafusion/core",
"datafusion/expr",
"datafusion/execution",
"datafusion/jit",
"datafusion/optimizer",
"datafusion/physical-expr",
Expand Down
40 changes: 22 additions & 18 deletions datafusion-cli/Cargo.lock

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

1 change: 1 addition & 0 deletions datafusion/core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ bzip2 = { version = "0.4.3", optional = true }
chrono = { version = "0.4.23", default-features = false }
dashmap = "5.4.0"
datafusion-common = { path = "../common", version = "19.0.0", features = ["parquet", "object_store"] }
datafusion-execution = { path = "../execution", version = "19.0.0" }
datafusion-expr = { path = "../expr", version = "19.0.0" }
datafusion-jit = { path = "../jit", version = "19.0.0", optional = true }
datafusion-optimizer = { path = "../optimizer", version = "19.0.0" }
Expand Down
8 changes: 5 additions & 3 deletions datafusion/core/src/execution/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,14 @@
//!

pub mod context;
pub mod disk_manager;
pub mod memory_pool;
// backwards compatibility
pub use crate::datasource::file_format::options;
pub mod registry;
pub mod runtime_env;

// backwards compatibility
pub use datafusion_execution::disk_manager;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I moved three modules in this first PR -- runtime_env will take a little more work as will context so I plan to do them as smaller follow on PRs

pub use datafusion_execution::memory_pool;
pub use datafusion_execution::registry;

pub use disk_manager::DiskManager;
pub use registry::FunctionRegistry;
43 changes: 43 additions & 0 deletions datafusion/execution/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

[package]
name = "datafusion-execution"
description = "Execution configuration support for DataFusion query engine"
version = "19.0.0"
homepage = "https://github.com/apache/arrow-datafusion"
repository = "https://github.com/apache/arrow-datafusion"
readme = "README.md"
authors = ["Apache Arrow <dev@arrow.apache.org>"]
license = "Apache-2.0"
keywords = [ "arrow", "query", "sql" ]
edition = "2021"
rust-version = "1.62"

[lib]
name = "datafusion_execution"
path = "src/lib.rs"


[dependencies]
datafusion-common = { path = "../common", version = "19.0.0" }
datafusion-expr = { path = "../expr", version = "19.0.0" }
hashbrown = { version = "0.13", features = ["raw"] }
log = "^0.4"
parking_lot = "0.12"
rand = "0.8"
tempfile = "3"
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
//! Manages files generated during query execution, files are
//! hashed among the directories listed in RuntimeConfig::local_dirs.

use crate::error::{DataFusionError, Result};
use datafusion_common::{DataFusionError, Result};
use log::debug;
use parking_lot::Mutex;
use rand::{thread_rng, Rng};
Expand Down Expand Up @@ -155,7 +155,6 @@ mod tests {
use std::path::Path;

use super::*;
use crate::error::Result;
use tempfile::TempDir;

#[test]
Expand Down
20 changes: 20 additions & 0 deletions datafusion/execution/src/lib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.

pub mod disk_manager;
pub mod memory_pool;
pub mod registry;
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

//! Manages all available memory during query execution

use crate::error::Result;
use datafusion_common::Result;
use std::sync::Arc;

mod pool;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
// specific language governing permissions and limitations
// under the License.

use crate::execution::memory_pool::{MemoryConsumer, MemoryPool, MemoryReservation};
use crate::memory_pool::{MemoryConsumer, MemoryPool, MemoryReservation};
use datafusion_common::{DataFusionError, Result};
use parking_lot::Mutex;
use std::sync::atomic::{AtomicUsize, Ordering};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

//! FunctionRegistry trait

use crate::error::Result;
use datafusion_common::Result;
use datafusion_expr::{AggregateUDF, ScalarUDF};
use std::{collections::HashSet, sync::Arc};

Expand Down
1 change: 1 addition & 0 deletions dev/release/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,7 @@ dot -Tsvg dev/release/crate-deps.dot > dev/release/crate-deps.svg
(cd datafusion/row && cargo publish)
(cd datafusion/physical-expr && cargo publish)
(cd datafusion/optimizer && cargo publish)
(cd datafusion/execution && cargo publish)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is the biggest change (a new crate to publish) -- cc @andygrove

(cd datafusion/core && cargo publish)
(cd datafusion/proto && cargo publish)
(cd datafusion/substrait && cargo publish)
Expand Down