-
-
Notifications
You must be signed in to change notification settings - Fork 64
Open
Labels
bugSomething isn't workingSomething isn't working
Description
As I was working on adding additional tests, I found this in the test-utils
feature
etl/etl/src/test_utils/materialize.rs
Lines 6 to 15 in 3d08fd7
pub trait FromTableRow: Sized { | |
/// The type used to identify this record (usually an ID field) | |
type Id: Eq + Clone; | |
/// Convert a TableRow into this type, returning None if conversion fails | |
fn from_table_row(table_row: &TableRow) -> Option<Self>; | |
/// Get the identifier for this record (used for updates/deletes) | |
fn id(&self) -> Self::Id; | |
} |
This would be super nice to be part of etl
's public API, so destinations can use it to avoid defining their own traits. I'd also want to include a FromTableRowBatch
trait, since in arrow-land, the columnar data model makes dealing with single rows memory-inefficient.
Happy to open an MR if think this would be an okay addition :)
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working