-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0b15e70
commit 137bd20
Showing
9 changed files
with
46 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
{ | ||
"rust-analyzer.cargo.features": "all", | ||
"editor.formatOnSave": true, | ||
"editor.minimap.showSlider": "always", | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,17 @@ | ||
#[derive(derive_more::Display, Debug)] | ||
pub enum Error { | ||
#[display(fmt = "internal error: {}", _0)] | ||
Internal(String), | ||
Internal(&'static str), | ||
} | ||
|
||
impl error_stack::Context for Error {} | ||
|
||
impl Error { | ||
pub fn internal() -> Self { | ||
Error::Internal("no additional context".to_owned()) | ||
Error::Internal("no additional context") | ||
} | ||
|
||
pub fn internal_msg(msg: String) -> Self { | ||
pub fn internal_msg(msg: &'static str) -> Self { | ||
Error::Internal(msg) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,12 @@ | ||
use arrow_schema::SchemaRef; | ||
use futures::stream::BoxStream; | ||
use sparrow_batch::Batch; | ||
use sparrow_core::ReadConfig; | ||
|
||
use crate::Error; | ||
|
||
/// Defines how a source provides data to the execution layer. | ||
pub trait Source: Send + Sync { | ||
fn schema(&self) -> SchemaRef; | ||
fn read(&self, projection: &[usize]) -> BoxStream<'_, error_stack::Result<Batch, Error>>; | ||
fn read(&self, read_config: ReadConfig) -> BoxStream<'_, error_stack::Result<Batch, Error>>; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters