Skip to content

Commit

Permalink
ref: fix circular dependencies (#844)
Browse files Browse the repository at this point in the history
Moves the sparrow-plan-execution test into sparrow-session to avoid
circular dependencies.
  • Loading branch information
jordanrfrazier authored Nov 1, 2023
1 parent 7508a6d commit 0ad4680
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

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

1 change: 0 additions & 1 deletion crates/sparrow-batch/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ proptest = { workspace = true, optional = true }

[dev-dependencies]
sparrow-testing = { path = "../sparrow-testing" }
sparrow-merge = { path = "../sparrow-merge" }
proptest.workspace = true

[lib]
Expand Down
1 change: 0 additions & 1 deletion crates/sparrow-plan-execution/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ index_vec.workspace = true
sparrow-backend = { path = "../sparrow-backend" }
sparrow-expressions = { path = "../sparrow-expressions" }
sparrow-logical = { path = "../sparrow-logical" }
sparrow-session = { path = "../sparrow-session" }
sparrow-testing = { path = "../sparrow-testing" }

[lib]
Expand Down
3 changes: 0 additions & 3 deletions crates/sparrow-plan-execution/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,6 @@ mod error;
mod source_tasks;
mod write_pipeline;

#[cfg(test)]
mod tests;

pub use error::*;

use crate::source_tasks::SourceTasks;
Expand Down
2 changes: 2 additions & 0 deletions crates/sparrow-session/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ tokio-stream.workspace = true
uuid.workspace = true

[dev-dependencies]
sparrow-expressions = { path = "../sparrow-expressions" }
sparrow-testing = { path = "../sparrow-testing" }

[lib]
bench = false
Expand Down
3 changes: 3 additions & 0 deletions crates/sparrow-session/src/partitioned.rs
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
mod session;
pub use session::*;

#[cfg(tests)]
mod tests;
1 change: 1 addition & 0 deletions crates/sparrow-session/src/partitioned/partitioned.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
mod basic_tests;
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
use crate::partitioned::Session;
use arrow_array::cast::AsArray;
use arrow_array::{Int64Array, RecordBatch, TimestampNanosecondArray, UInt64Array};
use sparrow_interfaces::source::{Source, SourceExt};
use sparrow_io::in_memory::InMemorySource;
use sparrow_logical::ExprRef;
use sparrow_session::partitioned::Session;
use std::sync::Arc;

use arrow_schema::{DataType, Field, Schema};

fn query(
session: &Session,
source: ExprRef,
) -> error_stack::Result<ExprRef, sparrow_session::Error> {
fn query(session: &Session, source: ExprRef) -> error_stack::Result<ExprRef, crate::Error> {
let a_str = session.add_literal(sparrow_logical::Literal::new_str("a"))?;
let a = session.add_expr("fieldref", vec![source.clone(), a_str])?;

Expand Down
2 changes: 2 additions & 0 deletions crates/sparrow-session/src/tests.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
//! Partitioned execution tests
mod partitioned;

0 comments on commit 0ad4680

Please sign in to comment.