Skip to content

Commit

Permalink
feat: add source trait (#803)
Browse files Browse the repository at this point in the history
Adds the `source` trait for sources to implement. The idea being they'll
be created as async functions and we can just call next on the returned
`stream` -- no need to make them a whole `ReadPipeline` or anything we
think.

* Adds the `sparrow-sources` crate
* Adds the `sparrow-interfaces` crate
* Refactors `batch` into `sparrow-batch`.

---------

Co-authored-by: Ben Chambers <[email protected]>
  • Loading branch information
jordanrfrazier and bjchambers authored Oct 12, 2023
1 parent 0445cb0 commit 13be46f
Show file tree
Hide file tree
Showing 36 changed files with 812 additions and 293 deletions.
57 changes: 57 additions & 0 deletions Cargo.lock

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

6 changes: 0 additions & 6 deletions crates/sparrow-arrow/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,12 @@
pub mod attachments;
#[cfg(feature = "avro")]
pub mod avro;
mod batch;
mod concat_take;
pub mod downcast;
pub mod hash;
pub mod hasher;
mod row_time;
pub mod scalar_value;
pub mod serde;
#[cfg(any(test, feature = "testing"))]
pub mod testing;
pub mod utils;

pub use batch::*;
pub use concat_take::*;
pub use row_time::*;
30 changes: 30 additions & 0 deletions crates/sparrow-batch/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
[package]
name = "sparrow-batch"
version.workspace = true
authors.workspace = true
edition.workspace = true
license.workspace = true
publish = false
description = """
Defines the main struct for wrapping RecordBatches in execution.
"""

[dependencies]
arrow.workspace = true
arrow-array.workspace = true
arrow-schema.workspace = true
arrow-select.workspace = true
derive_more.workspace = true
error-stack.workspace = true
itertools.workspace = true
static_init.workspace = true
proptest = { workspace = true, optional = true }

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

[lib]
bench = false
doctest = false
Loading

0 comments on commit 13be46f

Please sign in to comment.