Skip to content

Commit 41b4e49

Browse files
yahoNanJingyangzhongalamb
authored
Reorganize the project folders (#2081)
* Reorganize the project folders * fix: fix hash collision test * fix: tomlfmt Co-authored-by: yangzhong <yangzhong@ebay.com> Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>
1 parent 22fdca3 commit 41b4e49

File tree

312 files changed

+102
-94
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

312 files changed

+102
-94
lines changed

.github/workflows/rust.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,7 @@ jobs:
430430
export PARQUET_TEST_DATA=$(pwd)/parquet-testing/data
431431
cd datafusion
432432
# Force all hash values to collide
433-
cargo test --features=force_hash_collisions
433+
cargo test --all --features=force_hash_collisions
434434
env:
435435
CARGO_HOME: "/github/home/.cargo"
436436
CARGO_TARGET_DIR: "/github/home/target"

Cargo.toml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,21 +17,21 @@
1717

1818
[workspace]
1919
members = [
20-
"datafusion",
21-
"datafusion-common",
22-
"datafusion-expr",
23-
"datafusion-jit",
24-
"datafusion-physical-expr",
20+
"datafusion/core",
21+
"datafusion/common",
22+
"datafusion/expr",
23+
"datafusion/jit",
24+
"datafusion/physical-expr",
25+
"datafusion/proto",
2526
"datafusion-cli",
2627
"datafusion-examples",
27-
"datafusion-proto",
28-
"datafusion-storage",
2928
"benchmarks",
3029
"ballista/rust/client",
3130
"ballista/rust/core",
3231
"ballista/rust/executor",
3332
"ballista/rust/scheduler",
3433
"ballista-examples",
34+
"data-access",
3535
]
3636

3737
[profile.release]

ballista-examples/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ required-features = ["ballista/standalone"]
3636

3737
[dependencies]
3838
ballista = { path = "../ballista/rust/client", version = "0.6.0" }
39-
datafusion = { path = "../datafusion" }
39+
datafusion = { path = "../datafusion/core" }
4040
futures = "0.3"
4141
num_cpus = "1.13.0"
4242
prost = "0.9"

ballista/rust/client/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ ballista-core = { path = "../core", version = "0.6.0" }
3131
ballista-executor = { path = "../executor", version = "0.6.0", optional = true }
3232
ballista-scheduler = { path = "../scheduler", version = "0.6.0", optional = true }
3333

34-
datafusion = { path = "../../../datafusion", version = "7.0.0" }
34+
datafusion = { path = "../../../datafusion/core", version = "7.0.0" }
3535
futures = "0.3"
3636
log = "0.4"
3737
parking_lot = "0.12"

ballista/rust/core/Cargo.toml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ edition = "2018"
2727
build = "build.rs"
2828

2929
[features]
30+
# Used for testing ONLY: causes all values to hash to the same value (test for collisions)
31+
force_hash_collisions = ["datafusion/force_hash_collisions"]
3032
simd = ["datafusion/simd"]
3133

3234
[dependencies]
@@ -36,8 +38,8 @@ arrow-flight = { version = "11" }
3638
async-trait = "0.1.41"
3739
chrono = { version = "0.4", default-features = false }
3840
clap = { version = "3", features = ["derive", "cargo"] }
39-
datafusion = { path = "../../../datafusion", version = "7.0.0" }
40-
datafusion-proto = { path = "../../../datafusion-proto", version = "7.0.0" }
41+
datafusion = { path = "../../../datafusion/core", version = "7.0.0" }
42+
datafusion-proto = { path = "../../../datafusion/proto", version = "7.0.0" }
4143
futures = "0.3"
4244
hashbrown = "0.12"
4345
log = "0.4"

ballista/rust/core/src/execution_plans/shuffle_writer.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -452,6 +452,8 @@ mod tests {
452452
use tempfile::TempDir;
453453

454454
#[tokio::test]
455+
// number of rows in each partition is a function of the hash output, so don't test here
456+
#[cfg(not(feature = "force_hash_collisions"))]
455457
async fn test() -> Result<()> {
456458
let session_ctx = SessionContext::new();
457459
let task_ctx = session_ctx.task_ctx();
@@ -507,6 +509,8 @@ mod tests {
507509
}
508510

509511
#[tokio::test]
512+
// number of rows in each partition is a function of the hash output, so don't test here
513+
#[cfg(not(feature = "force_hash_collisions"))]
510514
async fn test_partitioned() -> Result<()> {
511515
let session_ctx = SessionContext::new();
512516
let task_ctx = session_ctx.task_ctx();

ballista/rust/core/src/serde/logical_plan/mod.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -922,7 +922,7 @@ mod roundtrip_tests {
922922
use core::panic;
923923
use datafusion::{
924924
arrow::datatypes::{DataType, Field, Schema},
925-
datafusion_storage::{
925+
datafusion_data_access::{
926926
self,
927927
object_store::{
928928
local::LocalFileSystem, FileMetaStream, ListEntryStream, ObjectReader,
@@ -949,7 +949,7 @@ mod roundtrip_tests {
949949
async fn list_file(
950950
&self,
951951
_prefix: &str,
952-
) -> datafusion_storage::Result<FileMetaStream> {
952+
) -> datafusion_data_access::Result<FileMetaStream> {
953953
Err(io::Error::new(
954954
io::ErrorKind::Unsupported,
955955
"this is only a test object store".to_string(),
@@ -960,7 +960,7 @@ mod roundtrip_tests {
960960
&self,
961961
_prefix: &str,
962962
_delimiter: Option<String>,
963-
) -> datafusion_storage::Result<ListEntryStream> {
963+
) -> datafusion_data_access::Result<ListEntryStream> {
964964
Err(io::Error::new(
965965
io::ErrorKind::Unsupported,
966966
"this is only a test object store".to_string(),
@@ -970,7 +970,7 @@ mod roundtrip_tests {
970970
fn file_reader(
971971
&self,
972972
_file: SizedFile,
973-
) -> datafusion_storage::Result<Arc<dyn ObjectReader>> {
973+
) -> datafusion_data_access::Result<Arc<dyn ObjectReader>> {
974974
Err(io::Error::new(
975975
io::ErrorKind::Unsupported,
976976
"this is only a test object store".to_string(),

ballista/rust/core/src/serde/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ fn str_to_byte(s: &str) -> Result<u8, BallistaError> {
351351
mod tests {
352352
use async_trait::async_trait;
353353
use datafusion::arrow::datatypes::SchemaRef;
354-
use datafusion::datafusion_storage::object_store::local::LocalFileSystem;
354+
use datafusion::datafusion_data_access::object_store::local::LocalFileSystem;
355355
use datafusion::error::DataFusionError;
356356
use datafusion::execution::context::{QueryPlanner, SessionState, TaskContext};
357357
use datafusion::execution::runtime_env::{RuntimeConfig, RuntimeEnv};
@@ -715,7 +715,7 @@ mod tests {
715715

716716
let scan = LogicalPlanBuilder::scan_csv(
717717
store,
718-
"../../../datafusion/tests/customer.csv",
718+
"../../../datafusion/core/tests/customer.csv",
719719
CsvReadOptions::default(),
720720
None,
721721
1,

ballista/rust/core/src/serde/physical_plan/from_proto.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ use crate::serde::{from_proto_binary_op, proto_error, protobuf};
2626
use crate::{convert_box_required, convert_required};
2727
use chrono::{TimeZone, Utc};
2828

29-
use datafusion::datafusion_storage::{
29+
use datafusion::datafusion_data_access::{
3030
object_store::local::LocalFileSystem, FileMeta, SizedFile,
3131
};
3232
use datafusion::datasource::listing::PartitionedFile;

ballista/rust/core/src/serde/physical_plan/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ use crate::serde::{
3333
use crate::{convert_box_required, convert_required, into_physical_plan, into_required};
3434
use datafusion::arrow::compute::SortOptions;
3535
use datafusion::arrow::datatypes::SchemaRef;
36-
use datafusion::datafusion_storage::object_store::local::LocalFileSystem;
36+
use datafusion::datafusion_data_access::object_store::local::LocalFileSystem;
3737
use datafusion::datasource::listing::PartitionedFile;
3838
use datafusion::execution::runtime_env::RuntimeEnv;
3939
use datafusion::logical_plan::window_frames::WindowFrame;
@@ -1020,7 +1020,7 @@ mod roundtrip_tests {
10201020
compute::kernels::sort::SortOptions,
10211021
datatypes::{DataType, Field, Schema},
10221022
},
1023-
datafusion_storage::object_store::local::LocalFileSystem,
1023+
datafusion_data_access::object_store::local::LocalFileSystem,
10241024
datasource::listing::PartitionedFile,
10251025
logical_plan::{JoinType, Operator},
10261026
physical_plan::{

0 commit comments

Comments
 (0)